Jump to content

mysql_num_rows problem


DarkHavn

Recommended Posts

[code]

connect();
$username = $_POST['agentlogin'];
$pass = md5($_POST['agentpass']);

$mysqlquery = "SELECT * FROM agent WHERE `name`='$username' AND `pass`='$pass'";
$mysqlquery2 = mysql_query("$mysqlquery");
if(mysql_num_rows("$mysqlquery2") == 1) {

[/code]


Ok apparently this isn't a valid mysql result resource?

Eh anyone see anything wrong with this bit of code? as i can't.

In theory this should work, as there is only one user that has this login and password, so the result should be one?
Link to comment
https://forums.phpfreaks.com/topic/18263-mysql_num_rows-problem/
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.