By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,664 Members | 1,643 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,664 IT Pros & Developers. It's quick & easy.

what is wrong here?

P: n/a
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
Jul 16 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.