Advertisement
Guest User

Untitled

a guest
Aug 21st, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. <?php
  2. include "newdb.php";
  3. $dbcon=connect_db();
  4. ?>
  5. <?php
  6. $username=$_POST["username"];
  7. $password=$_POST["password"];
  8. //$json=array();
  9. $statement="SELECT userid,fullname FROM users where username='$username' and password='$password'";
  10. $result=mysqli_query($dbcon,$statement);
  11. if($row=mysqli_fetch_array($result) )
  12. {
  13. echo json_encode($row);
  14. }
  15. close_db();
  16. exit();
  17. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement