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
Share on other sites

Guest
This topic is now 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.