Jump to content

[SOLVED] PHP Query Help


sl7ven

Recommended Posts

Hi, I have my connection to the mysql server and database both connecting, my problem is this in php:

 

$query = "SELECT username FROM users WHERE username = '$un' AND pass = SHA1('$p')";
$result = mysql_query($query, $dbc);
$row = mysql_fetch_array($result);

 

I get this error:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource

 

Is there something wrong with the above code?

Link to comment
https://forums.phpfreaks.com/topic/62288-solved-php-query-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.