Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- ?>
- <html>
- <head>
- <title>This is a Form Validation Sheet using Javascript</title>
- </head>
- <body>
- <h1><div align="center"><font color="Grey">Form Validation Sheet</font></div></h1>
- <hr>
- <div align="center">
- <form action='form_proccess.php' method='post'>
- <table cellspacing="10" cellpadding="10" width="750">
- <tr>
- <Td><b>Name:</b></td>
- <td><input type="text" name="name" value="<?php if(isset($_SESSION['name'])){ echo $_SESSION['name'];}?>"></td>
- <td><?php if(isset($_SESSION['error_name'])){ echo $_SESSION['error_name'];}?></td>
- </tr>
- <tr>
- <Td><b>Last Name:</b></td>
- <td><input type="text" name="lastname" value="<?php if(isset($_SESSION['lastname'])){ echo $_SESSION['lastname'];}?>"></td>
- <td><?php if(isset($_SESSION['error_lastname'])){ echo $_SESSION['error_lastname'];}?></td>
- </tr>
- <tr>
- <Td><b>Email Address:</b></td>
- <td><input type="text" name="emailaddress" value="<?php if(isset($_SESSION['emailaddress'])){ echo $_SESSION['emailaddress'];}?>"></td>
- <td><?php if(isset($_SESSION['error_emailaddress'])){ echo $_SESSION['error_emailaddress'];}?></td>
- </tr>
- <tr>
- <Td><b>Username:</b></td>
- <td><input type="text" name="username" value="<?php if(isset($_SESSION['username'])){ echo $_SESSION['username'];}?>"></td>
- <td><?php if(isset($_SESSION['error_username'])){ echo $_SESSION['error_username'];}?></td>
- </tr>
- <tr>
- <Td><b>Password:</b></td>
- <td><input type="text" name="password" value="<?php if(isset($_SESSION['password'])){ echo $_SESSION['password'];}?>"></td>
- <td><?php if(isset($_SESSION['error_password'])){ echo $_SESSION['error_password'];}?></td>
- </tr>
- <tr>
- <Td><b>Confirm Password:</b></td>
- <td><input type="text" name="confirmpassword" value="<?php if(isset($_SESSION['confirmpassword'])){ echo $_SESSION['confirmpassword'];}?>"></td>
- <td><?php if(isset($_SESSION['error_confirmpassword'])){ echo $_SESSION['error_confirmpassword'];}?></td>
- </tr>
- <tr>
- <Td><b>Comments:</b></td>
- <td><textarea cols='26' rows='6' name='comments'><?php if(isset($_SESSION['comments'])){ echo $_SESSION['comments'];}?></textarea></td>
- <td><?php if(isset($_SESSION['error_comments'])){ echo $_SESSION['error_comments'];}?></td>
- </tr>
- <tr>
- <td></td>
- <td colspan='2'>
- <input type='submit' name='Reset' value='Reset Form'>
- <input type='submit' name='Submit' value='Submit Form'>
- </td>
- </tr>
- </table>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement