Guest User

Untitled

a guest
Feb 24th, 2018
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. <?php
  2. session_start();
  3. include 'dbh.php';
  4.  
  5. $uname=$_POST['uname'];
  6. $pass=$_POST['pass'];
  7.  
  8.  
  9. $sql="SELECT * FROM signup WHERE username='$uname' AND password='$pass'";
  10. $result=$conn->query($sql);
  11.  
  12. if (!$row=$result->fetch_assoc()){
  13. header("Location:error.php");
  14.  
  15.  
  16.  
  17. } else {
  18. $_SESSION['name']=$_POST['uname'];
  19. header("Location:home.php");
  20. }
Add Comment
Please, Sign In to add comment