Jump to content

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resourc


jigsawsoul

Recommended Posts

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');

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.