mancombe Posted November 11, 2009 Share Posted November 11, 2009 hi guys i have made a registration page and login that works the problem is people can register the same username, here is what i have tried so far to prevent this but not having much luck. if($num_rows==0) { $sql="INSERT INTO $tbl_name VALUES('$id','$Username','$Password','$firstName','$lastName','$email')"; $res=mysql_query($sql) or die("cannot execute"); echo "<h1> You are Successfully Registered</h1>"; } else { echo " <h1>That user already Exist!</h1>" ; } ?> any advice would be good Link to comment https://forums.phpfreaks.com/topic/181156-registration-help/ Share on other sites More sharing options...
Daniel0 Posted November 11, 2009 Share Posted November 11, 2009 How doesn't it work. You might want to show the code that comes before this as well. Link to comment https://forums.phpfreaks.com/topic/181156-registration-help/#findComment-955745 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.