How to Insert Database Information into an E-mail

From: Date: Sun, 03 Feb 2002 22:00:12 +0000
Subject: How to Insert Database Information into an E-mail
Groups: php.db 
Request: Send a blank email to php-db+get-16467@lists.php.net to get a copy of this message
I am working on a rideboard and I am trying to figure out how to take information from a mysql database and place it in the e-mail I am trying to send out. Basically I want the e-mail to look similar to this: Name: John Doe Phone: 555-5555 State: New York and so on. Anyway the mail function in my php script looks as follows: mail("$emailwanted","$SubjectWanted","$BodyWanted","From: rideboard@123.com"); The $emailwanted is the address to where I am sending the e-mail. The $SubjectWanted is the subject of the e-mail. The $BodyWanted is the body and this is where I want to insert the information from the database in the format described above. I know how to get information from the database and print it out though I want $BodyWanted contain the information as above. Any suggestions would be appreciated. Thanks for the help. David Sugar DOIT certifies this message is virus free. If a virus was removed the sender will be automatically notified.

« previous php.db (#16467) next »