Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if($submit)
- {
- $first=$_POST['first'];
- $password=$_POST['password'];
- $db = mysql_connect("localhost", "root","");
- mysql_select_db("learndb",$db);
- $sql = "select * from admin where username = '" . $first . "' and password = '". $password . "'";
- $result = mysql_query($sql);
- if($result>0)
- {
- echo "LOGGED IN!!";
- }
- else
- {
- echo "ERROR!!!";
- }
- <form method="post" action="input - copy.php">
- First name:<input type="Text" name="first" placeholder="ENTER YOUR NAME"><br>
- password:<input type="password" name="password" placeholder="ENTER PASSWORD"><br>
- <input type="submit" name="submit" value="Enter information"></form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement