| 1. |
Solve : php user authentication... plss help? |
||||||
|
Answer» hello guys.. this week i've been practicing how to create a system using php. but im stack in the area wherein you are going to authenticate username and password. can you help me guys to figure out how to solve my problem? if ($errorMessage != '') { ?> } ?>
Register[/url] QuoteIt seems that most of us don't know that much about php yet. You might find more help at www.phpbuilder.net They have a great forum for php/mysql help.Code: [Select] $username = mysql_real_escape_string($_POST['username']); $password = $_POST['password']; // check if the user id and password combination is correct $sql = "SELECT * FROM account WHERE username = '$username' AND password = '$password'"; Is the name for the password field PASSWORD or password? Also, SINCE username and password are send over the internet, I recommend you encrypt both username and password when they sign up and login with MD5. So on both your sign up form and login form you'd have: Code: [Select]$username=MD5($_POST['username']); $password=MD5($_POST['password']); Quote from: Astoria on April 19, 2008, 03:45:24 PM
|
|||||||