Virajsinh

PhP_04_02

Feb 1st, 2018
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.58 KB | None | 0 0
  1. <?php
  2. $name = $_POST['name'];
  3. $surname = $_POST['surname'];
  4. $gender = $_POST['gender'];
  5. $add = $_POST['address'];
  6. $city = $_POST['city'];
  7. $pin = $_POST['pincode'];
  8. $mobile = $_POST['mobile'];
  9. ?>
  10.  
  11. <html>
  12.  
  13. <head>
  14.     <title> User Form Details </title>
  15. </head>
  16.  
  17. <body align='center'>
  18. <hr>
  19. <h3> User Details </h3>
  20. <hr>
  21.  
  22.     <table border='0' align='center' title='User Details'>
  23.        
  24.         <tr>
  25.             <td>Name </td>
  26.             <td>: <?php echo $name; ?></td>
  27.         </tr>
  28.        
  29.         <tr>
  30.             <td>SurName </td>
  31.             <td>: <?php echo $surname; ?></td>
  32.         </tr>
  33.        
  34.         <tr>
  35.             <td>Gender </td>
  36.             <td>: <?php echo $gender; ?></td>
  37.         </tr>
  38.        
  39.         <tr>
  40.             <td>Address </td>
  41.             <td>: <?php echo $add; ?></td>
  42.         </tr>
  43.        
  44.         <tr>
  45.             <td>City </td>
  46.             <td>: <?php echo $city; ?></td>
  47.         </tr>
  48.        
  49.         <tr>
  50.             <td>Pin </td>
  51.             <td>: <?php echo $pin; ?></td>
  52.         </tr>
  53.        
  54.         <tr>
  55.             <td>Mobile </td>
  56.             <td>: <?php echo $mobile; ?></td>
  57.         </tr>
  58.        
  59.        
  60.     </table>
  61. </body>
  62. </html>
  63.  
  64. <?php
  65. echo "<hr>";
  66. print_r($_POST);
  67. echo "<hr>";
  68. echo "<p>UserName : ".$name;
  69. echo "<p>Surname  : ".$surname;
  70. echo "<p>Gender   : ".$gender;
  71. echo "<p>Address  : ".$add;
  72. echo "<p>City     : ".$city;
  73. echo "<p>Pin      : ".$pin;
  74. echo "<p>Mobile   : ".$mobile;
  75.  
  76. echo "<hr>";
  77.  
  78. echo "<p> <b>gettype();</b> funcation";
  79. echo "<p>Pincode Type is : ".gettype($pin);
  80.  
  81. echo "<hr>";
  82.  
  83. echo "<p> <b>settype();</b> funcation";
  84. echo "<p> Pincode Type Set ".settype($pin,'integer');
  85.  
  86. echo "<p> After <b> Pincode </b> Type is : ".gettype($pin);
  87.  
  88. echo "<hr>";
  89.  
  90. echo "<p>Variable Set or Not ?".isset($pin);
  91.  
  92. var_dump(isset($pin));
  93.  
  94. ?>
Add Comment
Please, Sign In to add comment