Advertisement
enochmh2

checks db and error if user doesnt exist

Dec 19th, 2014
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. if(!get_magic_quotes_gpc()) {
  2.  
  3. $_POST['email'] =addslashes ($_POST['email']);
  4. }
  5. $check = mysql_query("SELECT * FROM users WHERE username = '".$_POST['username']."'")or die(mysql_error());
  6. //give error if user doesnt exist
  7.  
  8. if ($check2==0) {
  9. die('Uuser not found<a href="signup.html">Click Here to Register</a>');
  10. }
  11. while ($info=mysql_fetch_array ($check))
  12. {
  13. $_POST['pass'] = stripslashes($_POST['pass']);
  14. $info['password'] = stripslashes($info['password']);
  15. $_POST['pass'] = md5($_POST['pass']);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement