I have an html form that is processed by a separate php file. In the php file, there is a section where an html confirmation email is sent to the person filling out the form. I will not post the entire confirmation email section, but here are the headers and the beginning of the message:
$pfw_subject = 'Confirmation of Registration for 28th Annual Insolvency Conference';
$pfw_email_to = "$Email,$AssistantEmail";
$pfw_header = "From: cbfadmin@jbsmgmt.com\n"
. "Bcc: cdrossen@cdrmarketing.com\n"
. "Reply-To: cbfadmin@jbsmgmt.com\n"
. "MIME-Version: 1.0\n"
. "Content-Type: text/html; charset=ISO-8859-1\n";
$pfw_message = "<html>
<head></head>
<body>.....continues
Here is the code of a table row that I am having a hard time with. There are 3 registration types (posted variable is $RegType and choices are Reg1, Reg2, and Reg3) with 3 different prices (posted variables are - $Total_Reg1, $Total_Reg2, $Total_Reg3. In the email I want it to read something like this:
Registration Type: $RegType - $Total_Reg1 Showing the registration type and the price
So I need to know which registration type the person selected in order to get the correct $ Total. Here is what I am attempting to do, but it is not working:
<tr>
<td width='35%' height='18'>Registration Type:</td>
<td width='65%' height='18'>"
if($RegType == "Reg1"){"
$RegType - $Total_Reg1"
else if ($RegType == "Reg2"){"
$RegType - $Total_Reg2"
else if ($RegType == "Reg3"){"
$RegType - $Total_Reg3"
}"
</td>
</tr>
....html continues, then finally:
</body>
</html>";
What is happening is the email prints out but stops at Registration Type: and does not give the value and also aborts the rest of the email. Probably some sort of syntax error and I'm sure there is a better way to do this so any help would be greatly appreciated. Thanks in advance.