Advertisement
Guest User

Untitled

a guest
Jan 11th, 2016
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. <?php
  2. session_start();
  3. $error='';
  4. if (isset($_POST['submit'])) {
  5. if (empty($_POST['username']) || empty($_POST['password'])) {
  6. $error = "Username or Password is invalid";
  7. } else {
  8. $username = $_POST['username'];
  9. $password = $_POST['password'];
  10. $username = ($username);
  11. $password = ($password);
  12. if ($rows == 1) {
  13. $_SESSION['login_user'] = $username;
  14. header("location: profile.php");
  15. } else {
  16. $error = "Username or Password is invalid";
  17.  
  18. }
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement