Guest User

login

a guest
Jun 18th, 2016
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. <?php
  2. $con = mysqli_connect("mysql.hostinger.in", "u604894946_mk", "123456mk", "u604894946_mk");
  3.  
  4. $Username = $_POST["Username"];
  5. $Password = $_POST["Password"];
  6.  
  7. $statement = mysql_prepare($con, "SELECT ID FROM `u604894946_mk`.`IdentificationDetails` WHERE Username = ? AND Password = ?");
  8. mysql_stmt_bind_param($statement, "ss", $Username, $Password);
  9. mysql_stmt_execute($statement);
  10.  
  11. mysql_stmt_store_result($statement);
  12. mysql_stmt_bind_result($statement, $ID);
  13.  
  14. $response = array();
  15. $response["success"] = false;
  16.  
  17. while(mysql_stmt_fetch($statement)){
  18. $response["success"] = true;
  19. $response["ID"] = $ID;
  20. }
  21.  
  22. echo json_encode($response);
  23. ?>
Add Comment
Please, Sign In to add comment