Created
December 20, 2011 12:56
-
-
Save meeDamian/1501497 to your computer and use it in GitHub Desktop.
[ PHP | lib ] retreive data passed by POST request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
// put this at the beginning of file, or where you'd like to start receiving data | |
$ok=true; | |
foreach(array('put','here','names','of','passed','POST','data','indexes') as $v)$ok&=(bool)($$v=(isset($_POST[$v]))?$_POST[$v]:false); | |
/* | |
* output: | |
* - $ok => states if errors occured | |
* - $name => every index gets changed into variable | |
*/ | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment