Jump to content

Simple query is driving me mad !!!


Germaris

Recommended Posts

Hi there!

 

In my script I use the following code:

 

$table = "_lisausers"; 
$mypassword; //this is a 'POST' variable
$query =mysql_query("SELECT pwd FROM `$table` WHERE pwd LIKE '$mypassword'" ) or die();
if (mysql_num_rows( $query ) > 0) {
print "&retour=true";
}
else {
print "&retour=false";
}

 

Despite the fact that $mypassword already exists in the $table, this query always gives me a wrong result if I ask an existing or not pwd in this table !!!

 

Would you tell me what's wrong in this query and the if/else block?

 

Many thanks in advance for your help!

 

Regards,

Gerry

 

 

Link to comment
https://forums.phpfreaks.com/topic/92838-simple-query-is-driving-me-mad/
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.