Advertisement
Guest User

Untitled

a guest
Jan 12th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. $con=mysqli_connect("localhost","my_user","my_password","my_db");
  2. // Check connection
  3. if (mysqli_connect_errno()){
  4. echo "Failed to connect to MySQL: " . mysqli_connect_error();
  5. }
  6.  
  7. $username = $_REQUEST['username'];
  8. $password = $_REQUEST['password'];
  9.  
  10. $tsd=mysqli_query($con, "SELECT * FROM `admin` WHERE `username` = '$username' AND `password` ='$password'")or die("Problem with the query");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement