Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. if (isset($_POST['loggin'])) {
  2.  
  3. $realname=$_POST['realname'];
  4. $password=md5($_POST['password']);
  5.  
  6. if ($realname && $password) {
  7.  
  8. $usersor=$db->prepare("SELECT * from authme where realname=:realname and password=:password");
  9. $usersor->execute(array(
  10. 'realname' => $realname,
  11. 'password' => $password
  12. ));
  13.  
  14. $say=$usersor->rowCount();
  15.  
  16. if ($say>0) {
  17. $_SESSION['realname'] = $realname;
  18.  
  19. header('Location:../profil?status=ok');
  20.  
  21. } else {
  22.  
  23. header('Location:../profil?status=no');
  24.  
  25. }
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement