Great help dude, it works fine now. Much appreciated.
I created mainfile.php which is a form that is submited to thanks.php, which
contains just the small mail function stuff and a call to include 
mailbody.inc, which has all the fields layed out nicely on screen for the 
user to see as well as it being sent to a person in a well formatted message. 
This is all done with test pages, which I can now move over to my production 
site, then after all that is working (there are 5 online forms), I will work 
on getting the data from the forms into a mysql database.

Regards,
--
Chip

On Wednesday 17 October 2001 16:54, Richard Baskett wrote:
> Actually what I meant was that the $body variable would be inside an
> include file just to decrease the amount of coding inside your main file.
> So...
>
> "mainfile.php"
> You would have your form and either you can have the form submit to self or
> to another file.. for explanation purposes I will say another file called
> "thanks.php"
>
> "thanks.php"
> this has your form processing information, plus the mail function, and
> tells the user thanks for submitting the form.  This file would include
> "mailbody.inc" which is the template for the body of your mail message.
> include('mailbody.inc');
>
> "mailbody.inc"
> <?
> $body ="
> This is the header of the email message
>
> Greetings $name,
>
> How are you today, you've spent $amount of dollars in the last $days.
>
> Thank You!
>
> Management";
> ?>
>
> Did this make more sense?
>
> Rick
>
> > On Wednesday 17 October 2001 15:38, Richard Baskett wrote:
> >> For the body what I usually do, if you're planning on just a regular
> >> text email, is to make an include file with this type of formatting:
> >
> > I guess you mean I can use an include file in my variable? Like this:
> > $body = newbody.inc
> >
> > Does the variable need to be quoted? I think most likely, but am not
> > sure. I'll check into this more tomorrow at work.
> > --
> > Chip Wiegand
> >
> >> $body ="
> >> This is the header of the email message
> >>
> >> Greetings $name,
> >>
> >> How are you today, you've spent $amount of dollars in the last $days.
> >>
> >> Thank You!
> >>
> >> Management";
> >>
> >> In other words when you do something like this you can actually see the
> >> formatting and all the \n's or \r's will be there.  I have found this to
> >> bed the easiest way of doing email formatting.  I hope it makes sense to
> >> you, if not you can always write me back and Ill have another go at
> >> explaining it :)
> >>
> >> Rick
> >>
> >>> I have a form with around 50 text fields. I have used the mail function
> >>> to send
> >>> forms with simple textarea's, names, and email addresses, but what
> >>> about when
> >>> I have around 50 fields to send?
> >>> I am using the following format for my mails:
> >>>   <?
> >>>       if(isset($submit)):
> >>>         $date = date("M d, Y");
> >>>         $to = "[EMAIL PROTECTED]";
> >>>         $subject = "Web Site Comments";
> >>>         $body = "On $date\n $name\n ($email) wrote<br><br>" .
> >>> $feedback; mail($to, $subject, $body, "From:$email\nContent-Type:
> >>> text/html; charset=iso-8859-1\nMime-Version: 1.0\nX-Mailer: PHP/" .
> >>> phpversion()); print("<h3>Thanks for the comments!</h3>\nWe appreciate
> >>> you taking the time to share your thoughts with us.");
> >>>       else:
> >>>   ?>
> >>> The fields $feedback, $name, $email are from the form, but I have
> >>> another form with around 50
> >>> fields. Is there an alternative to listing all 50or so fields on that
> >>> one $body line? I'd like
> >>> the final message to have a reasonable amount of formatting to keep the
> >>> many fields sorted out and easy to read.
> >>> --
> >>> Chip Wiegand
> >>> Computer Services
> >>> www.simradusa.com
> >>> [EMAIL PROTECTED]
> >>> Simrad, Inc
> >>> Lynnwood, WA
> >>> 425-712-1138
> >>>
> >>> "There is no reason anyone would want a computer in their home."
> >>> --Ken Olson, president, chairman and founder of Digital Equipment
> >>> Corp., 1977
> >>>         (-- Then why do I have nine? Somebody help me!)
> >>>
> >>>
> >>> --
> >>> PHP General Mailing List (http://www.php.net/)
> >>> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>> For additional commands, e-mail: [EMAIL PROTECTED]
> >>> To contact the list administrators, e-mail:
> >>> [EMAIL PROTECTED]
> >
> > --
> > --
> > Chip W.

-- 
--
Chip W.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to