ID First Name Last Name Password
Warning: mysql_connect(): Access denied for user: 'taken out by author' (Using password: YES) in /home/PATH/people.php on line 12
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/PATH/people.php on line 13
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/PATH/people.php on line 15
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/PATH/people.php on line 16
I'm pretty sure the connection isn't working.
I edited some stuff, too - the stuff in bold.
Edit: changed "code" tag to "php" tag.
Last edited by jslick on Wed Jul 21, 2004 11:28 am, edited 1 time in total.
First things first: Put your code in [syntax=php][/syntax] tags - it colours the code as well which makes it much easier to read .
Your problem is that when you call mysql_connect, you are sending (I think) the database you want to connect to, and a password. You need to send a username instead of the database.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Can you login through the command line using that username and password? Also, if you're trying to access a remote database, make sure the username you are using is allowed to login from wherever you're coming from.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.