monkeypaw201 Posted July 28, 2008 Share Posted July 28, 2008 I posted the code below, i personally can't find anything wrong with it and have triple-checked spelling and the form names etc... $user = mysql_query("SELECT * FROM `users` WHERE `activation_key` = '$_POST[key]' AND `email` = '$_POST[email]'"); $row_user = mysql_fetch_array($user); $user_count = mysql_num_rows($user); the errors: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in public_html/human-resources/confirm.php on line 45 Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in public_html/human-resources/confirm.php on line 46 Link to comment https://forums.phpfreaks.com/topic/116935-solved-strange-errors-i-cant-get-rid-of/ Share on other sites More sharing options...
genericnumber1 Posted July 28, 2008 Share Posted July 28, 2008 the real problem is with the query, try changing the first line to $user = mysql_query("SELECT * FROM `users` WHERE `activation_key` = '$_POST[key]' AND `email` = '$_POST[email]'") or die(mysql_error()); that should tell you what is wrong with your query (I haven't looked to see if I see anything wrong) Link to comment https://forums.phpfreaks.com/topic/116935-solved-strange-errors-i-cant-get-rid-of/#findComment-601324 Share on other sites More sharing options...
MasterACE14 Posted July 28, 2008 Share Posted July 28, 2008 the query should be like this.... $user = mysql_query("SELECT * FROM `users` WHERE `activation_key` = '" . $_POST['key'] . "' AND `email` = '" . $_POST['email'] . "'") or die(mysql_error()); You just needed to insert the $_POST's correctly. Regards ACE Link to comment https://forums.phpfreaks.com/topic/116935-solved-strange-errors-i-cant-get-rid-of/#findComment-601349 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.