Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <?php
- $username = "tal";
- $password = "hackeru";
- ?>
- <html>
- <?php
- echo "Hello, ".$username;
- ?>
- <form method="POST" >
- <input type="text" placeholder="Username..." name="user" />
- <input type="text" placeholder="Password..." name="pass" />
- <input type="submit" value="Login!" />
- </form>
- <a href="register.html">Register!</a>
- <a href="new-post.html">New Post!</a>
- <?php
- if(isset($_POST['user'], $_POST['pass'])) {
- if($_POST['user'] == $username && $_POST['pass'] == $password) {
- echo "Success!";
- } else {
- echo "Error!";
- }
- }
- ?>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement