Jump to content

Archived

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

DarkHavn

mysql_num_rows problem

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?

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×

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.