Created
August 16, 2015 03:35
-
-
Save kruxor/ad86a46f21dca9381012 to your computer and use it in GitHub Desktop.
Loop through post array checking that the method is post, using key and values.
This file contains 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
<?php | |
if($_SERVER['REQUEST_METHOD']=="POST") { | |
$message = ""; | |
foreach( $_POST as $stuff => $stuff_val ) { | |
if( is_array( $stuff ) ) { | |
foreach( $stuff as $thing => $thing_val) { | |
$message .= "$thing : $thing_val <br>"; | |
} | |
} else { | |
$message .= "$stuff : $stuff_val <br>"; | |
} | |
} | |
echo $message; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment