hey guys, maybe you can give me a hand with this concept.
I have a form with 3 Fields (the names of the fields are unknown as they are user defined).
Now when a user enters the details for this form, the script converts, using a foreach, the $_POST's into an array as $field=>value, so the array would look like this:
"(the field name)" => "(The Value of that field)" ,
etc etc etc
Is this clear, and can it be done. Using _POST to create an array.
What i'm truely aiming at is having a script that processes form completely autonomously and without prior Formname configurations.
Thanks.
$_POST & Arrays
Moderator: General Moderators
straight from the manual
Code: Select all
while (list ($key, $val) = each ($HTTP_POST_VARS)) {
echo "$key => $val<br>";
}Also:
-Nay
Code: Select all
foreach($_POST as $key => $val) {
print $key . " => " . $val;
}