PDA

View Full Version : PHP & Tables


J_mo
11-02-2009, 09:21 AM
Hi,

I basically know extremely little of PHP and have created a reservation form using tables, on receipt of the email I just get a long list of answers...Would it be possible to make the inputed data email in the form of a table so it is easier to read when the recipient receives it?

J_Mo

edbr
11-02-2009, 09:54 AM
yes you need to use html to send it

J_mo
11-02-2009, 10:05 AM
Can you be a little more precise please?

edbr
11-02-2009, 11:48 AM
at present it sounds like you are sending text probably using mail(), in sending an html you wil need to send headers to format as a html mail

edbr
11-02-2009, 11:53 AM
this may help
http://www.w3schools.com/PHP/func_mail_mail.asp

J_mo
11-02-2009, 12:46 PM
OK,

I see what to do but cant implement it.

If i had a table with say 4 entries...name, age, height & weight how would i get each input into a table in the email?

$message = "
<html>
<head>
<title>HTML email</title>
</head>
<body>
<p>This email contains HTML Tags!</p>
<table>
<tr>
<td>name</td>
<td>age</td>
<td>height</td>
<td>weight</td>
</tr>
</table>
</body>
</html>
";