Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8" />
- <title>{ firstProject }</title>
- </head>
- <body>
- <form method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>">
- Name: <input type="text" name="name"><br>
- E-mail:<input type="text" name="email"><br>
- Password: <input type="password" name="password"><br>
- <input type="submit">
- </form>
- <?php
- if ($_SERVER["REQUEST_METHOD"] == "POST"){
- $name = $_POST['name'];
- if(empty($name)){
- echo "Name is empty";
- }
- else{
- echo "<h3>The name is: $name";
- echo "<br>";
- }
- $email = $_POST['email'];
- if(empty($email)){
- echo "Email is empty";
- }
- else{
- echo "The email is: $email";
- echo "<br>";
- }
- $password = $_POST['password'];
- if(empty($password)){
- echo "Password is empty";
- }
- else{
- echo "The password is: $password</h3>";
- }
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement