what is wrong here?

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 ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-14-2003
The Lone Wolf
 
Posts: n/a
Default what is wrong here?

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


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:45 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0