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

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.