Advertisement
Guest User

Untitled

a guest
Jul 24th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. function getLogin($conn){
  2. if(isset($_POST['login']))
  3. {
  4. $uid=$_POST['uid'];
  5. $pwd=$_POST['pwd'];
  6.  
  7. $sql= "SELECT * FROM user WHERE uid='$uid' AND pwd ='$pwd'";
  8. $result=$conn->query($sql);
  9. if (mysqli_num_rows($result) == 1){
  10. if($row = $result->fetch_assoc()){
  11.  
  12. $_SESSION['id'] = $row['id'];
  13. header("Location : index.php?loginsuccess");
  14. exit();
  15. }
  16. }
  17. else{
  18.  
  19.  
  20.  
  21. }
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement