Database question
Posted: Sun Apr 10, 2005 2:58 pm
This code takes a record and looks if the password matches the POST-password.
I was now wondering how I could take data from the record.
I was trying $login_info["firstname"],
but it doesn't work
Well I hope you guys can help me here's the code :
I was now wondering how I could take data from the record.
I was trying $login_info["firstname"],
but it doesn't work
Well I hope you guys can help me here's the code :
Code: Select all
$provided_username = $_POST['username'];
$select_login = "SELECT password FROM users WHERE username = '$provided_username'";
$query_login = mysql_query($select_login, $db_connection);
$login_info = mysql_fetch_array($query_login);
if ($_POST['password'] != $login_info["password"])
{
HERE SHOULD BE THE EVENTS
}