RE: [PHP-DB] guestbook to db to email

2003-01-11 Thread John W. Holmes
> I know this allready, I explained this in the original message.
> 
> "I know how to manage sending simple form elements to an email
> (email,subject,body) and so on"
> 
> How do I FORMAT the body of an email when there are multiple variable
> inputs
> for the body??
> 
> Formatting as in Line Breaks etc etc.

I have no idea what you mean by "simple form elements" and "multiple
variable inputs"

You can use \n as a line break in your email, such as

$message = "Line1\nLine2\nLine3\nLine4";

If you're talking about variables that are arrays and what not, then
just loop through them and add the values to the message however you
want. 

The "formatting" of the mail is up to you, just create a string that has
your formatting in it and send it. 

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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




Re: [PHP-DB] guestbook to db to email

2003-01-11 Thread Bruce Levick
I know this allready, I explained this in the original message.

"I know how to manage sending simple form elements to an email
(email,subject,body) and so on"

How do I FORMAT the body of an email when there are multiple variable inputs
for the body??

Formatting as in Line Breaks etc etc.

Cheers


- Original Message -
From: "John W. Holmes" <[EMAIL PROTECTED]>
To: "'Bruce Levick'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, January 11, 2003 1:08 PM
Subject: RE: [PHP-DB] guestbook to db to email


> > I am going to build some form elements to use as submitting to a DB
> for  a
> > guestbook. Then display those inputs on another page as the entries to
> the
> > guestbook. I also want to send the information they submit to an email
> > address. I know how to manage sending simple form elements to an email
> > (email,subject,body) and so on. But with a guestbook there will be a
> few
> > more elements in the body of my email.
> >
> > Does anybody know of a very good way to format the body of an email
> when
> > form elements are sent into the body??
>
> Form elements are just variables. Insert them into a string and make
> that your message...
>
> $message = "This is a message from {$_POST['name']}. They said this:
> {$_POST['message']}";
>
> etc...
>
> ---John W. Holmes...
>
> PHP Architect - A monthly magazine for PHP Professionals. Get your copy
> today. http://www.phparch.com/
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




RE: [PHP-DB] guestbook to db to email

2003-01-10 Thread John W. Holmes
> I am going to build some form elements to use as submitting to a DB
for  a
> guestbook. Then display those inputs on another page as the entries to
the
> guestbook. I also want to send the information they submit to an email
> address. I know how to manage sending simple form elements to an email
> (email,subject,body) and so on. But with a guestbook there will be a
few
> more elements in the body of my email.
> 
> Does anybody know of a very good way to format the body of an email
when
> form elements are sent into the body??

Form elements are just variables. Insert them into a string and make
that your message...

$message = "This is a message from {$_POST['name']}. They said this:
{$_POST['message']}";

etc...

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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