Advertisement
Guest User

Untitled

a guest
May 20th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.37 KB | None | 0 0
  1. <?php
  2. session_start();
  3. ?>
  4. <html>
  5. <head>
  6. <title>This is a Form Validation Sheet using Javascript</title>
  7. </head>
  8. <body>
  9.  
  10. <h1><div align="center"><font color="Grey">Form Validation Sheet</font></div></h1>
  11. <hr>
  12. <div align="center">
  13.  
  14. <form action='form_proccess.php' method='post'>
  15.  
  16. <table cellspacing="10" cellpadding="10" width="750">
  17.  
  18. <tr>
  19. <Td><b>Name:</b></td>
  20. <td><input type="text" name="name" value="<?php if(isset($_SESSION['name'])){ echo $_SESSION['name'];}?>"></td>
  21. <td><?php if(isset($_SESSION['error_name'])){ echo $_SESSION['error_name'];}?></td>
  22. </tr>
  23.  
  24. <tr>
  25. <Td><b>Last Name:</b></td>
  26. <td><input type="text" name="lastname" value="<?php if(isset($_SESSION['lastname'])){ echo $_SESSION['lastname'];}?>"></td>
  27. <td><?php if(isset($_SESSION['error_lastname'])){ echo $_SESSION['error_lastname'];}?></td>
  28. </tr>
  29.  
  30. <tr>
  31. <Td><b>Email Address:</b></td>
  32. <td><input type="text" name="emailaddress" value="<?php if(isset($_SESSION['emailaddress'])){ echo $_SESSION['emailaddress'];}?>"></td>
  33. <td><?php if(isset($_SESSION['error_emailaddress'])){ echo $_SESSION['error_emailaddress'];}?></td>
  34. </tr>
  35.  
  36. <tr>
  37. <Td><b>Username:</b></td>
  38. <td><input type="text" name="username" value="<?php if(isset($_SESSION['username'])){ echo $_SESSION['username'];}?>"></td>
  39. <td><?php if(isset($_SESSION['error_username'])){ echo $_SESSION['error_username'];}?></td>
  40. </tr>
  41.  
  42. <tr>
  43. <Td><b>Password:</b></td>
  44. <td><input type="text" name="password" value="<?php if(isset($_SESSION['password'])){ echo $_SESSION['password'];}?>"></td>
  45. <td><?php if(isset($_SESSION['error_password'])){ echo $_SESSION['error_password'];}?></td>
  46. </tr>
  47.  
  48. <tr>
  49. <Td><b>Confirm Password:</b></td>
  50. <td><input type="text" name="confirmpassword" value="<?php if(isset($_SESSION['confirmpassword'])){ echo $_SESSION['confirmpassword'];}?>"></td>
  51. <td><?php if(isset($_SESSION['error_confirmpassword'])){ echo $_SESSION['error_confirmpassword'];}?></td>
  52. </tr>
  53.  
  54. <tr>
  55. <Td><b>Comments:</b></td>
  56. <td><textarea cols='26' rows='6' name='comments'><?php if(isset($_SESSION['comments'])){ echo $_SESSION['comments'];}?></textarea></td>
  57. <td><?php if(isset($_SESSION['error_comments'])){ echo $_SESSION['error_comments'];}?></td>
  58. </tr>
  59.  
  60. <tr>
  61. <td></td>
  62. <td colspan='2'>
  63. <input type='submit' name='Reset' value='Reset Form'>
  64. <input type='submit' name='Submit' value='Submit Form'>
  65. </td>
  66. </tr>
  67.  
  68. </table>
  69.  
  70.  
  71. </form>
  72. </body>
  73. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement