Jump to content

[SOLVED] how comes this code is being ignored?


merylvingien

Recommended Posts

else
  {


         $sql=("SELECT email, ipaddress FROM table");
	$result = mysql_query($sql);
$row = mysql_fetch_array($result);

if($row['email'] == $email) {echo 'error message'; include("foot.html"); exit;}
if($row['ipaddress'] == $ipAddress) {echo 'error meassage'; include("foot.html"); exit;}
}

 

For some reason this code is being bypassed and even if the email address and ipaddress is already in the database it still goes forth and registers a user for a second time. Am i missing something?

I think your better off only checking email addresses

 

sorry made a mistake :P

$sql= "SELECT email FROM table where email = '{$email}' ";
      $result = mysql_query($sql);

if(mysql_num_rows($result) > 0) {echo 'error message'; include("foot.html"); exit;}

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.