I suppose this is not the answer you are looking for, but it's the only
one a newbie like me knows. Try to build a $body variable and pass it to
the mail() function. Try this:

$from = $sender_field;

$subject = $subject_field;

$body = $form_field1;
$body .= $form_field2;
$body .= $form_field3;
$body .= $form_field4;
$body .= $form_field5;
$body .= $form_field6;

$headers = // extra headers IF any

and then do mail($from, $subject, $body, $headers);

You could do a very much smaller script simply by creating an array of
the form objects. Just name them like this:

<input type="text" name="form_field[]">

After the information is passed to PHP, just make a loop which will make
an array of the form fields that are NOT null.

Hope this helps,

C.

> -----Original Message-----
> From: Jeremy Bowen [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, July 07, 2002 2:28 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Mailing all the elements of a form
> 
> Hey,
> 
> I have looked in PHP manual but I cannot seem to find what I am
looking
> for.
> 
> I have a very large form that I need to be able to mail. I just don't
want
> to have to code all of the field into my mail() function.
> 
> Thanks,
> 
> Jeremy
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to