Advertisement
Guest User

Untitled

a guest
Jan 13th, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. if($submit)
  2. {
  3. $first=$_POST['first'];
  4. $password=$_POST['password'];
  5. $db = mysql_connect("localhost", "root","");
  6. mysql_select_db("learndb",$db);
  7. $sql = "select * from admin where username = '" . $first . "' and password = '". $password . "'";
  8. $result = mysql_query($sql);
  9.  
  10.  
  11. if($result>0)
  12. {
  13. echo "LOGGED IN!!";
  14. }
  15. else
  16. {
  17. echo "ERROR!!!";
  18. }
  19.  
  20. <form method="post" action="input - copy.php">
  21. First name:<input type="Text" name="first" placeholder="ENTER YOUR NAME"><br>
  22. password:<input type="password" name="password" placeholder="ENTER PASSWORD"><br>
  23. <input type="submit" name="submit" value="Enter information"></form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement