PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
What I am trying to do is create a PHP/MYSQL based login and register system. So far, I have managed to make it so you can register, which will create a table with a name the user specifies in my database. I can login fine after I create it, it's just my problem is for dealing with people who entered in a login name that doesn't exist. Please tell me what i am doing wrong, or at least some type of clue
$row = mysql_fetch_array($result);
if ($password != $row['password']){
//error message here
}
I also wouldn't do the "That login name does not exist" bit as it tells someone that the password was correct but the username was bad, you should just generally say "Bad login" and don't tell the user if it was down to a bad username and/or password.
why do you create a table for each user?
is there a very special reason why you don't simply add a new record to an existing user table?
Never put userinput untreated into a database query