jigsawsoul Posted March 18, 2010 Share Posted March 18, 2010 I'm getting this error message and im not sure why [codeWarning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/jigsaws2/public_html/project/public/_login/reg2.php on line 14 <?php session_start(); ob_start(); include('../../resources/config.php'); include($config["paths"]["resources"] . 'opendb.php'); include($config["paths"]["resources"] . '_library/login.php'); $email = mysql_real_escape_string($_POST['email']); $password = mysql_real_escape_string($_POST['password']); $result = mysql_query("SELECT email FROM productlogin WHERE email = '$email'"); $emailcheck = mysql_num_rows($result); if($emailcheck > 0){ $_SESSION["message"] = 'This email address is already registered with us. Having trouble, you can <a href="recover.php">reset your password here</a>.'; header ('Location: register.php'); exit(); } include($config["paths"]["resources"] . 'closedb.php'); ?> Link to comment https://forums.phpfreaks.com/topic/195695-warning-mysql_num_rows-supplied-argument-is-not-a-valid-mysql-result-resourc/ Share on other sites More sharing options...
PFMaBiSmAd Posted March 18, 2010 Share Posted March 18, 2010 Your query failed to execute and returned a FALSE value instead of a result resource. Echo mysql_error() to find out why the query failed. Link to comment https://forums.phpfreaks.com/topic/195695-warning-mysql_num_rows-supplied-argument-is-not-a-valid-mysql-result-resourc/#findComment-1028145 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.