Guest User

Untitled

a guest
Apr 27th, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  4. <title>Untitled Document</title>
  5. </head>
  6.  
  7. <body>
  8. <?php
  9.  
  10. $dbhost="....";
  11. $dbuser="......";
  12. $dbpass=".....";
  13. $dbname="......";
  14. $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
  15. mysql_select_db($dbname, $conn);
  16.  
  17. $username=$_REQUEST['username'];
  18. $password=$_REQUEST['password'];
  19. $query="SELECT * FROM DCM_Login WHERE USERNAME='$username' AND PASSWORD='$password'";
  20. $result=mysql_query($query) or die("Unable to verify user ".mysql_error());
  21.  
  22. //actual verification
  23.  
  24. if(mysql_fetch_array($result)>0)
  25. {
  26. echo 1;
  27.  
  28. }
  29. else
  30. {
  31.  
  32. echo 0;
  33.  
  34. }
  35.  
  36. //mysql_close();
  37. ?>
  38. </body>
  39. </html>
Add Comment
Please, Sign In to add comment