Advertisement
Guest User

Untitled

a guest
Jul 25th, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. <?php
  2. include "db.php";
  3. $dbcon=connect_db();
  4. ?>
  5. <?php
  6. SESSION_START();
  7. ?>
  8. <?php
  9. $username=$_POST["username"];
  10. $password=$_POST["password"];
  11. $statement="SELECT userid,fullname FROM users where username='$username' and password='$password'";
  12. //echo $statement;
  13. //exit();
  14. $result=mysqli_query($dbcon,$statement);
  15. $rowcount=mysqli_num_rows($result);
  16. if($rowcount==1)
  17. {
  18. $row=mysqli_fetch_array($result);
  19. $_SESSION['userid'] = $row["userid"];
  20. $_SESSION['fullname'] = $row["fullname"];
  21. echo "good";
  22. }
  23. else
  24. {
  25. echo "not good";
  26. }
  27. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement