Advertisement
Echo89

$_POST usage prerequisites

Oct 25th, 2013
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.30 KB | None | 0 0
  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. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement