Echo89

$_POST usage prerequisites

Oct 25th, 2013
54
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. /* Example: $_POST verfication */
  4.  
  5. /* Make sure you check that any $_POST or $_GET index isset() before use to avoid unnecessary errors */
  6. if(isset($_POST['some_index']))
  7. {
  8.     /* Do something with $_POST index */
  9. }
  10. else
  11. {
  12.     /* Do something else if $_POST['some_index'] isn't set */
  13. }
  14.  
  15. ?>
RAW Paste Data