PCHomepage
Programmer
I've done this before and know I can loop through the returned POSTS to get everything I need using:
but how can I make return results that I can use as $variable = $value pairs elsewhere in the script? $variable would be the name of the field as submitted by the form. If I try to echo $key[0] to the screen outside the loop, it seems to just give a single character so clearly I've missed something obvious.
Code:
$results = '';
foreach ($_POST as $key => $value) {
$key = $value;
}
but how can I make return results that I can use as $variable = $value pairs elsewhere in the script? $variable would be the name of the field as submitted by the form. If I try to echo $key[0] to the screen outside the loop, it seems to just give a single character so clearly I've missed something obvious.