I have a php-based form mailer tied to a rather lengthy service order form, and was wondering if there was any effective way to manage the output from the form mailer so it's all laid out in an easy-to-read structure, like a table, perhaps? If I need to clarify at all, or provide a sample of my code, please let me know.

Thanks in advance for any advice,

- Devin

It's probably best if you provide a sample of the code; it lets us see exactly how you do things and give you better advice.

Sorry this took so long, but I was enjoying the holiday weekend. Anyway, here's the basics of my code:


if (!isset($_POST['contact_email']))
 echo "<script language=\"JavaScript\"><!--\n ";
 echo "top.location.href = \"$valid_ref1\"; \n// --></script>";

if($ref_page==$valid_ref1) $valid_referrer=1;
elseif($ref_page==$valid_ref2) $valid_referrer=1;
 echo "<script language=\"JavaScript\"><!--\n alert(\"ERROR - not sent.\\n\\nCheck your 'valid_ref1' and 'valid_ref2' are correct within form.php.\");\n";
 echo "top.location.href = \"formpage.html\"; \n// --></script>";

$contact_name = ($_POST["contact_name"]);
$contact_phone_number = ($_POST["contact_phone_number"]);
$contact_email = ($_POST["contact_email"]);

$other_variables_from_form = ($_POST["other_variables_from_form"]);

$checkbox_variables = implode("\r",$_POST["checkbox_variables"]);


$replymessage = "Hello $contact_name,  here's your confirmation";

$body = "\r
Contact name: $contact_name\n
Phone: $contact_phone_number\n
Email: $contact_email\n

       "$From: $contact_email");
       "$Receipt: $subject",
       "From: $replyemail\nReply-To: $replyemail");
echo $success_sent_msg;
include ('confirmation.html');


Bear in mind, it's a bit more complex than this. I've got a long list of text fields, radio buttons, and checkboxes I'm gathering information from. The output is going to be read by others that will need to be able to make sense of it, and quickly. If it's even possible, I'd like to be able to put the output into a table within the email that goes out to those people, for easier reading.

This article has been dead for over six months. Start a new discussion instead.