Guest User

Untitled

a guest
Feb 13th, 2019
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. <?php
  2. //$username = htmlentities($_REQUEST['username']);
  3. //$password = htmlentities($_REQUEST['password']);
  4.  
  5. // database credentials
  6. include('../templates/db_connect.php');
  7.  
  8. // Connect to database
  9. $conn = mysqli_connect($servername, $db_username, $db_password, $db_name);
  10.  
  11. if ($conn){
  12. echo 'success </br>';}
  13.  
  14.  
  15. if (mysqli_connect_errno()){
  16. echo "Failed to connect to MySQL: " . mysqli_connect_error();
  17. }
  18.  
  19. echo json_encode($user_result);
  20.  
  21. echo "user not found";
Add Comment
Please, Sign In to add comment