Greetings, I'm using a familiar formula to retrieve and check results from a mysql db. However, I'm stuck on a response I haven't seen before. Perhaps someone can tell me why I'm getting the response I am. TIA: [color=blue][/color] <?PHP // if the user hit the submit button and filled the email field then ... if(isset($_POST['submit']) && $email != "") { // Check db for existence of user $link = mysql_connect ("localhost", "the_admin", "my_password"); if(!$link) { echo "Database Connect Error: " . mysql_error() . "<BR>Please contact our company or try back later."; } // Select the database $selectResponse = mysql_select_db ("the_database", $link); if(!$selectResponse) { echo "Database Select Error. Please contact our company or try back later."; } // Make the SQL statement call $query = sprintf("SELECT Cemail, Ccqrt_question, Ccqrt_answer FROM customer_data WHERE Cemail='%s'", mysql_real_escape_string($email)); $result = mysql_query($query, $link); echo "Query: $query<P>\n"; echo "Result: [$result]<BR>Error:" . mysql_error() . "<P>"; if(!$result) { echo "Customer [$email] was not found to be on record. Please check your spelling and try again or "; echo "<A HREF=\"custREG.htm\">create a new account</A>. Thank you."; } else { $row = mysql_fetch_row($result); $Cemail = $row[0]; $Ccqrt_question = $row[1]; $Ccqrt_answer = $row[2]; echo "Security Question: $Ccqrt_question<P>\n"; echo "<INPUT TYPE=\"text\" SIZE=\"50\" MAXLENGTH=\"50\" NAME=\"answer\"><P>\n"; echo "I cannot remember this either. Please just reset my password and email it to me.\n"; } mysql_close($link); } else { echo "Enter your username (email address)<BR>\n"; echo "<INPUT TYPE=\"text\" SIZE=\"50\" MAXLENGTH=\"40\" NAME=\"email\"><BR>\n"; echo "<INPUT TYPE=\"reset\" NAME=\"Reset\" VALUE=\"Reset Form\"> \n"; echo "<INPUT TYPE=\"submit\" NAME=\"submit\" VALUE=\"submit\">\n"; } ?> [color=black][/color] NOTE: This is, of course, incomplete and I have ECHOs embeded to help me figure what's going on. Here is what I get when I put either a good or or bad query in: [color=red][/color] Query: SELECT Cemail, Ccqrt_question, Ccqrt_answer FROM customer_data WHERE Cemail='s.austin@megabucks.com' Result: [Resource id #2] Error: [color=black][/color] I've done this many times before without fail. Can anyone see the problem?