Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //you need name property to send to post on forms
- if(isset($_POST['submit'])){
- //check for submit posting correctly?
- $username = $_POST['username'];
- $password = $_POST['password'];
- echo "hello $username";
- echo " <br> Your password is $password";
- }
- ?>
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>WORMY DOG</title>
- </head>
- <body>
- <!-- check for isset in #_post with submit -->
- <form action="form.php" method="post">
- <input type="text" placeholder="Enter Username" name="username">
- <br>
- <input type="password" placeholder="Enter Password" name="password">
- <br>
- <input type="submit" name="submit">
- </form>
- <?php
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement