Mailing my form data in an html table

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
phprookie
Forum Newbie
Posts: 1
Joined: Thu May 27, 2004 9:12 pm

Mailing my form data in an html table

Post by phprookie »

I am trying to gather all users data from a html form and send that data in a php message. I have created an html table and populated it with the data. The problem is that oncei receive the email i just sent , it is not parsed and shown on a table rather but the whole html is in the mail. This is what i have.
$newmessage=<<<NEWMESSAGE

<html>
<head>
<table width="200" border="2" cellspacing="2" cellpadding="2">
<caption>
Please Quote the price of the following parts numbers
</caption>
<tr>
<td>1&nbsp;</td>
<td>{#$parts_array[0]#}&nbsp;</td>
<td>{#$parts_array[1]#}&nbsp;</td>
<td>&nbsp;</td>
<td>2&nbsp;</td>
<td>{#$parts_array[2]#}&nbsp;</td>
<td>{#$parts_array[3]#}&nbsp;</td>
<td>&nbsp;</td>
<td>3&nbsp;</td>
<td>{#$parts_array[4]#}&nbsp;</td>
<td>{#$parts_array[5]#}&nbsp;</td>
</tr>
<tr>
<td>4&nbsp;</td>
<html>
<head>

mail($email, $subject, $message, "From: $username");

why do i make sure that the datq will me in a grid table because this what i built in html? Help help
bla5e
Forum Contributor
Posts: 234
Joined: Tue May 25, 2004 4:28 pm

Post by bla5e »

maybe just me - but i dont understand wtf ur doing. make the code more organised.. what does $parts_array[4] and all them represent?
d3ad1ysp0rk
Forum Donator
Posts: 1661
Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA

Post by d3ad1ysp0rk »

Your email doesn't accept HTML. So it parses it as text.

Sign up for a hotmail account and try sending it to that.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

could also be that the call to the mail function doesn't have content-type header in it...
Post Reply