Possible Duplicate:
mysql_fetch_array() expects parameter 1 to be resource, boolean given in select
if (!empty($_POST)){ $email_to=$_POST['email_to']; $email_to=mysql_real_escape_string($_POST['email_to']); $sql = "UPDATE `cosmos`.`members` SET `conf` = '2' WHERE `members`.`email` = '$email_to';"; $result=mysql_query($sql) or trigger_error(mysql_error().$sql); $count=mysql_affected_rows($result); // line 20 if($count==1){ $rows=mysql_fetch_array($result); $unique=$rows['u_code']; $name=$rows['username']; // ---------------- SEND MAIL FORM ---------------- $to=$email_to; $subject="Your Account Password Request! - Cosmos"; $header="from: Tayal's/Cosmos "; $messages= "Hey $name ,\r\n"; $messages.="You recently requested a new password"; $messages.="
Confirmation Link \r\n"; $sentmail = mail($to,$subject,$messages,$header); echo $messages; } else { echo "Not found your email in our database"; } }
Warning: mysql_affected_rows() expects parameter 1 to be resource, boolean given in C:\wamp\www\a\l\forget.php on line 20