Jump to content

$row = $result->fetch_row();


sepoto
 Share

Recommended Posts

  if($failed == false){	$sql = "select count(*) from dsg_users where email like '$email'";	$result = $db->query($sql);	$row = $result->fetch_row();	if($row[0] > 0){		$msg .= "That email has already been registered"; 		$failed = true;	}  }

It is noteworthy I think that at this point the table 'dsg_users' is empty. For some reason I am not sure of yet "$row = $result->fetch_row();" halts execution of the script. I believe that this script was written for PHP5.2. I always seem to get great guidance from this forum. Thank you.

Link to comment
Share on other sites

You can probably use $result->num_rows to check the number of rows before trying to get a row. Other than that, the error message from PHP would help.
There is no error message. Perhaps that is because my php.ini is set to be too permissive. Thank you very much for your reply.
Link to comment
Share on other sites

did you tried the sugestion to check the number of rows using $result->num_rows()?you have to check the number of rows. if its zero then no email id is there else it has.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...