Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- index.html
- <html>
- <head>
- <body>
- <center>
- <h1>Login Page</h1>
- <form action="welcome.php"method="post">
- Username:
- <input type="text" name="username">
- <br>
- Password:
- <input type="password" name="password">
- <br><br>
- <input type="submit" name="submit" value="Login">
- </form>
- </center>
- </body>
- </head>
- </html>
- ------------------
- display.php
- <html>
- <body>
- <center>
- <h1>
- Welcome <?php echo $_POST["username"]; ?><br>
- </h1></center>
- </body>
- </html>
- 4*
- <html>
- <head>
- <body>
- <center>
- <h1>Registration form</h1>
- <form action="display.php" method="post">
- First name:
- <input type="text" name="name">
- <br>
- <br>
- Last name:
- <input type="text" name="userName">
- <br><br>
- Password:
- <input type="password" name="password">
- <br><br>
- Re-enter Password:
- <input type="password" name="re-EnterPassword">
- <br><br>
- Address:
- <textarea name="address"></textarea>
- <br><br>
- Gender:
- <input type="radio" name="gender" value="Male">Male
- <input type="radio" name="gender" value="Female">Female
- <br><br>
- District Name:
- <select name ="districtName">
- <option value="Chennai">Chennai</option>
- <option value="Coimbatore">Coimbatore</option>
- </select>
- <br><br>
- Events:
- <input type="checkbox" name="events[]" value="Wedding">Wedding
- <input type="checkbox" name="events[]" value="Corporate">Corporate
- <input type="checkbox" name="events[]" value="Social">Social
- <br><br>
- <input type="submit" name="register"value="Register">
- </form>
- </center>
- </body>
- </head>
- </html>
- --------
- display.php
- <html>
- <body>
- <h1>User Details</h1>
- Name :<?php echo $_POST["name"]; ?><br>
- User name: <?php echo $_POST["userName"]; ?><br>
- Address :<?php echo $_POST["address"]; ?><br>
- Gender :<?php echo $_POST["gender"]; ?><br>
- District Name :<?php echo $_POST["districtName"]; ?><br>
- Events:<?php
- foreach($_POST["events"] as $selected){
- echo $selected.",";
- }?>
- </body>
- </html>
Add Comment
Please, Sign In to add comment