modimil

post

May 1st, 2012
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.40 KB | None | 0 0
  1. Example: 1
  2.  
  3.     <html>
  4.  
  5.     <form action='GET_Variable_1.php' method='POST'>
  6.     <input type='text' name='myname' ><br />
  7.     <input type='submit' value='Click here' />
  8.     </form>
  9.  
  10.     <?php
  11.     $name =$_POST['myname'];
  12.     if ($name)
  13.     echo "Hellow, $name."
  14.     ?>
  15.  
  16.     </html>
  17.  
  18. Example: 2
  19.  
  20.     <html>
  21.  
  22.     <form action='POST_Variable_1.php' method='POST'>
  23.     <input type='text' name='myname' ><br />
  24.     <input type='submit' value='Click here' />
  25.     </form>
  26.  
  27.     <?php
  28.     $name =$_POST['myname'];
  29.     if ($name)
  30.     echo "Hellow, $name."
  31.     ?>
  32.  
  33.     </html>
  34.  
  35.  
  36. Example: 3
  37.  
  38.     <html>
  39.  
  40.     <form action='POST_Variable_3.php' method='POST'>
  41.     <input type='password' name='password' ><br />
  42.     <input type='submit' value='Click here' />
  43.     </form>
  44.  
  45.     <?php
  46.     $name =$_POST['password'];
  47.     if ($name)
  48.     echo "Thanks for your password."
  49.     ?>
  50.  
  51.     </html>
  52.  
  53.  
  54. Example: 4
  55.  
  56.     <html>
  57.  
  58.     <form action='POST_Variable_4.php' method='POST'>
  59.     <input type='password' name='password' ><br />
  60.     <input type='submit' value='Click here' />
  61.     </form>
  62.  
  63.     <?php
  64.     $password =$_POST['password'];
  65.     if ($name)
  66.     echo "Thanks for your password. $password"
  67.     ?>
  68.  
  69.     </html>
  70.  
  71.  
  72. Example: 5
  73.  
  74.     <html>
  75.  
  76.     <form action='POST_Variable_5.php' method='POST'>
  77.     <input type='password' name='password' ><br />
  78.     <input type='submit' value='Click here' />
  79.     </form>
  80.  
  81.     <?php
  82.     $password =$_POST['password'];
  83.     if ($password)
  84.     echo "Thanks for your password. $password"
  85.     ?>
  86.  
  87.     </html>
Advertisement
Add Comment
Please, Sign In to add comment