I have a form. It has any number of hidden fields, named "exercise 1-100". Their names all start with "exercise" as in:
<input type=hidden name=exercise1> ... ? <input type=hidden name=exercise11> any number fo these possible ... <input type=hidden name=exercise71>
How can I create one scipt that will recognise all of them? Any number of them. My idea is a bit like formmail.pl that reads any old field and mails it. Mine will read any number of "exercise" fields.
You could just loop over the _POST array.
foreach ($_POST as $field_name => $field_value) { $content .= "$field_name = $field_value\n"; }
Then just email $content. You could filter out the excerciseN fields if you only wanted to send those.
- Brad
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php