Advertisement
Guest User

Untitled

a guest
Jun 14th, 2016
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. if ($user == $email && $pass = $password) {
  2. session_start();
  3. $_SESSION['mysesi'] = $name;
  4. $_SESSION['user'] = $user;
  5. echo "<script>window.location.assign('index.php')</script>";
  6. } elseif (empty($email) || empty($password)) {
  7. ?>
  8. <div class="alert alert-danger alert-dismissible" role="alert">
  9. <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
  10. <strong>Warning!</strong> Please fill out all fields.
  11. </div>
  12. <?php
  13. } else {
  14. ?>
  15. <div class="alert alert-danger alert-dismissible" role="alert">
  16. <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
  17. <strong>Warning!</strong> Incorrect combination of Email Address and Password.
  18. </div>
  19. <?php
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement