Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2016
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.72 KB | None | 0 0
  1. <?php header('Access-Control-Allow-Origin: *');
  2.  
  3. $username = $_GET['fname'];
  4. $password = $_GET['fpass'];
  5. $con=new mysqli('mysql.hostinger.com.br',u348501196_andro,412167,u348501196_andro);
  6. // Check connection
  7. if (mysqli_connect_errno())
  8. {
  9. echo "Failed to connect to MySQL: " . mysqli_connect_error();
  10. }
  11. else
  12. {
  13. echo "connected!";
  14. }
  15.  
  16. $qz = "SELECT id FROM members where username='".$username."' and password='".$password."'" ;
  17. $qz = str_replace("\'","",$qz);
  18. $result = mysqli_query($con,$qz);
  19.  
  20. $result = mysqli_query($con,$qz);
  21. if (!$result) {
  22. printf("Error: %s\n", mysqli_error($con));
  23. }
  24. else{
  25. print("YES");}
  26. exit();
  27.  
  28. while($row = mysqli_fetch_array($result))
  29. {
  30. echo $row['id'];
  31. }
  32. mysqli_close($con);
  33.  
  34.  
  35. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement