Forum Moderators: coopster
<? php
session_start();
for($i=1;$<=$_SESSION['total'];$i++) {
$_SESSION['id-' . $i]=$_POST['id-' . $i];
$_SESSION['ad-' . $i]=$_POST['ad-' . $i];
}
$message=
"<html>
<body>
<table>
<tr>
<td>" .
for($i=1;$<=$_SESSION['total'];$i++) {
$_SESSION['id-' . $i] .
$_SESSION['ad-' . $i] .
} . "
</td>
</tr>
</table>
</body>
</html>";
mail( "email@address.com", $message );
?>
There are more variables, but this is the guts of it. Am I way off?
$message .= $_SESSION['id-' . $i];
$message .= $_SESSION['ad-' . $i];
}//for
$message .= "</td></tr></table></body></html>";
That should store what you need. Let me know if you need more help.
Here's my code after your suggestions:
<?php
session_start();
$message =
"<html>
<head>Request</head>
<body>
<table>
<tr>
<td>Name:</td>
<td>" . $_SESSION['Name'] . " " . $_SESSION['Email'] . " " . $_SESSION['Phone'] . "</td>
<td> </td>
</tr>
<tr>
<td></td>
<td valign='top'>" . $_SESSION['plan'] . "<br>";
for($i=1;$i<=$_SESSION['total'];$i++) {
$message .= $_SESSION['id-' . $i];
$message .= $_SESSION['fee-' . $i];
$message .= $_SESSION['msg-' . $i];
$message .= $_SESSION['eg-' . $i];
$message .= $_SESSION['da-' . $i];
$message .= $_SESSION['eq-' . $i];
$message .= $_SESSION['wi-' . $i];
$message .= $_SESSION['ce-' . $i];
$message .= $_SESSION['wir-' . $i];
}
$message .= "</td>
<td> </td>
</tr>
</table>
</body>
</html>"
;
$headers = "MIME-Version: 1.0" . "\r\n";
$headers = $headers . "Content-type: text/html; charset=iso-8859-1" . "\r\n";
$headers = $headers . "From: address@email.com";
mail( "address@email.com", "Request", $message, $headers );
header( "Location: http://www.example.com" );
?>
[edited by: dreamcatcher at 6:17 pm (utc) on Sep. 10, 2008]
[edit reason] use example.com. Thanks. [/edit]