Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(isset($_POST['username']) && isset($_POST['password']))
- {
- $user = $_POST['username'];
- $pass = $_POST['password'];
- if ($user === 'admin' && $pass === 'password')
- {
- //do something
- }
- else
- {
- //do something
- }
- }
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <title>Login</title>
- </head>
- <body>
- <h1>login?</h1>
- <form method="POST" action="">
- <input type="text" name="username" placeholder="Username">
- <input type="password" name="password" placeholder="Password">
- <input type="submit" value="Submit">
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement