I'm working on a login, .php page. I used the following query in my login.php :
$query = "SELECT user_id, first_name FROM users WHERE username='$u' AND pasword=PASSWORD('$p')";
$result = @mysql_query ($query);
$row = mysql_fetch_array ($result, MYSQL_NUM);
if ($row) {
$_SESSION['first_name'] = $row[1];
$_SESSION['user_id'] = $row[0];
ob_end_clean();
//// End of code in question.
Even when i enter the above SELECT query directly into PHPAdmin i still get back empty results. Even when i define the correct values directly and they definitely match what is in the mysql database setup.--STILL empty results.
PLEASE HELP! What am i doing wrong?
thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm working on a login, .php page. I used the following query in my login.php :
$query = "SELECT user_id, first_name FROM users WHERE username='$u' AND pasword=PASSWORD('$p')";
$result = @mysql_query ($query);
$row = mysql_fetch_array ($result, MYSQL_NUM);
if ($row) {
$_SESSION['first_name'] = $row[1];
$_SESSION['user_id'] = $row[0];
ob_end_clean();
//// End of code in question.
Even when i enter the above SELECT query directly into PHPAdmin i still get back empty results. Even when i define the correct values directly and they definitely match what is in the mysql database setup.--STILL empty results.
PLEASE HELP! What am i doing wrong?
thanks!