Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- INDEX.PHP
- <html>
- <form action="login.php" methood="POST">
- Username: <input type='text' name='username'/><br/>
- Password: <input type='password' name='password'/><br/>
- <input type='submit' value='Log In'/>
- </form>
- </html>
- LOGIN.PHP
- <?php
- $username = $_POST["username"];
- $password = $_POST["password"];
- if ($username && $password)
- {
- $connect = mysql_connect('localhost','root','') or die("Couldn't Connect");
- mysql_select_db('php_login') or die("Couldn't finf database");
- }
- else
- die("Please enter a username and a password");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement