Hi
I'm working on a registration system and I've faced a problem with checking if the email is already inthedatabase
this is my checking code

$sql    = "SELECT * FROM users WHERE email='".$email."'";
    $result = mysql_query($sql);
    $row1   = mysql_fetch_assoc($result);
    $row1['email']; 
   if($email = $row1['email'])

the problem is that when I put any email that is not in the database it show me an error that this email is already registerd!

Recommended Answers

line 5

 if($email == $row1['email'])

and what are you trying to do on line 4?

Jump to Post

All 2 Replies

line 5

 if($email == $row1['email'])

and what are you trying to do on line 4?

done thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.