MySQL Forums
Forum List  »  PHP

Re: Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource
Posted by: Selim Lasram
Date: October 14, 2009 02:37AM

You username field is 'login', so your line :
$username = $_POST['username'];
should be :
$username = $_POST['login'];

An advice... replace the following line :
$result = mysql_query("SELECT id FROM login WHERE username='$username' AND passphrase=MD5('$passphrase') ");
with :
$query = "SELECT id FROM login WHERE username='$username' AND passphrase=MD5('$passphrase') ";
echo $query;
$result = mysql_query($query);
to print out the query you are running.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.