close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

How To Add If Then Statement To Body

Thread began 3/05/2013 9:49 am by jennifersaas446228 | Last modified 3/05/2013 2:54 pm by jennifersaas446228 | 345 views | 2 replies

jennifersaas446228

How To Add If Then Statement To Body

I'm sure it's how I'm formatting the statement but in all of the examples I could find in this board and online, I couldn't get any of them to work... well so far. In the code below, everything is working and showing up until it reaches the if then statement and I'm not sure what else needs to be done, formatting-wise, so that it works within the body formatting. Help anyone??


***************

//Start Mail Body
$MailBody = $MailBody . "<html><head></head><body>";
$MailBody = $MailBody . "<h2>Congratulations \r\n";
$MailBody = $MailBody . ((isset($_POST["HName"]))?$_POST["HName"]:"");
$MailBody = $MailBody . "! Mr. Capacity is your friend... You Got In!</h2>\r\n";
$MailBody = $MailBody . "<h3>Registration Details</h3>\r\n";
$MailBody = $MailBody . "<p><strong>Name: </strong>";
$MailBody = $MailBody . ((isset($_POST["FName"]))?$_POST["FName"]:"");
$MailBody = $MailBody . " ";
$MailBody = $MailBody . ((isset($_POST["LName"]))?$_POST["LName"]:"");
$MailBody = $MailBody . " </p>\r\n";
$MailBody = $MailBody . "<p><strong>Hash Name: </strong>";
$MailBody = $MailBody . ((isset($_POST["HName"]))?$_POST["HName"]:"");
$MailBody = $MailBody . " </p>\r\n";
$MailBody = $MailBody . "<p><strong>Home Kennel:</strong> ";
$MailBody = $MailBody . ((isset($_POST["Kennel"]))?$_POST["Kennel"]:"");
$MailBody = $MailBody . " </p>\r\n";
$MailBody = $MailBody . "<p><strong>Email Address:</strong>*";
$MailBody = $MailBody . ((isset($_POST["EmailAddy"]))?$_POST["EmailAddy"]:"");
$MailBody = $MailBody . " </p>\r\n";
$MailBody = $MailBody . "<p><strong>Phone Number:</strong> ";
$MailBody = $MailBody . ((isset($_POST["ContactNum1"]))?$_POST["ContactNum1"]:"");
$MailBody = $MailBody . " </p>\r\n";
$MailBody = $MailBody . "<p><strong>Address:</strong> ";
$MailBody = $MailBody . ((isset($_POST["Addy"]))?$_POST["Addy"]:"");
$MailBody = $MailBody . ", ";
$MailBody = $MailBody . ((isset($_POST["City"]))?$_POST["City"]:"");
$MailBody = $MailBody . ", ";
$MailBody = $MailBody . ((isset($_POST["state"]))?$_POST["state"]:"");
$MailBody = $MailBody . " ";
$MailBody = $MailBody . ((isset($_POST["PostalCode"]))?$_POST["PostalCode"]:"");
$MailBody = $MailBody . " </p>\r\n";
$MailBody = $MailBody . "<p>";
$MailBody = $MailBody . "</p>\r\n";
$MailBody = $MailBody . "</body></html>";
$MailBody = $MailBody . "<p><strong>Doing Trail:</strong> \r\n";

$trl=((isset($_POST["TrailID"]))?$_POST["Trail"]:"");
if ($trl="1")
{
echo "Shiggilicious";
}
else if ($trl="2")
{
echo "Never Leave Camp";
}
else
{
echo "Undecided";
}

$MailBody = $MailBody . "</p>\r\n";
$MailBody = $MailBody . "</body>\r\n";
$MailBody = $MailBody . "</html>";

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...