SHARE
TWEET

Untitled

a guest May 22nd, 2017 92 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. include("login.php");
  3.  
  4. $host="localhost";
  5. $username ="root";
  6. $password="";
  7. $db_name="users";
  8. $tbl_name="users_info";
  9.  
  10. $mysql_connect("$host","$username","null")or die(mysql_error());
  11. $mysql_select_db("$user_info")or die("mysql_error"());
  12.  
  13. if
  14. $myusername= $_GET['username'];
  15. or else "Incorrect username. Please try again";
  16. mysql_real_escape_strings()
  17. if
  18. $mylastname= $_GET['password'];
  19. or else "incorrect password. Please try again";
  20.  
  21. $sql="Select * FROM $tbl_name WHERE username='$username' and password='$password'";
  22. $result="mysql_query($sql)";
  23.  
  24. session_register("username");
  25. session_register("password");
  26. }
  27. else {
  28. echo "$mysql_error()";
  29. }
  30. ?>
  31. <html>
  32. <head>
  33. <body>
  34. <?php
  35. if
  36. Username:
  37. <input type="text" name="username" />
  38. or else "Incorrect Username. Please try again";
  39. <br />
  40. if
  41. Password:
  42. <input type="password" name="password" />
  43. or else "Incorrect password. Please try again";
  44. <input type="submit" value="submit" />
  45. </form>
  46. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top