This is a discussion on what is wrong here? within the PHP Language forums, part of the PHP Programming Forums category; hi, i was wondering wat is wrong in this little code below??? <?php $verifyemail = $_GET['verify']; $checkemail = "SELECT ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
hi,
i was wondering wat is wrong in this little code below??? <?php $verifyemail = $_GET['verify']; $checkemail = "SELECT verified FROM users WHERE (email = '$verifyemail')"; $emailresult = mysql_query ($checkemail); if (mysql_num_rows('$emailresult') != 1) die('We have not found you in our database'); // <=== line 114 $checkverify = "UPDATE users SET verified = 'yes' WHERE (email = '$verifyemail')"; mysql_query ($checkverify); ?> when i run this i get this error Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/virtual/site755/fst/var/www/html/verify.php on line 114 i don't get it i checkt it trough the next problem is that wen i quote the line 114 out because i'm sure that the row is in the database (it's just a check) the update doesnt change the value in the database from 'no' to 'yes' thanks for your help |