$SShell = $_POST['_SShell'];
$AShell = $_POST['_AShell'];
$SMedia = $_POST['_SMedia'];
if ($_POST['xOrder']) {
if ((!$SShell) && (!$AShell) && (!$SMedia)) { $Error = "Please choose a hosting plan"; }
else if (($SShell) && ($AShell)) { $Error = "Please choose only one hosting plan"; }
else if (($SShell) && ($SMedia)) { $Error = "Please choose only one hosting plan"; }
else if (($AShell) && ($SMedia)) { $Error = "Please choose only one hosting plan"; }
}
if ((!$_POST['xOrder']) || ($Error)) {
echo "$Error ";
?>
}
else {
if ($SShell) {
switch ($SShell) {
case 'SimBNC' : $ShellName = 'Simple BNC'; $Price = 3; break;
case 'SSA' : $ShellName = 'Shell Plan A'; $Price = 5; break;
case 'SSB' : $ShellName = 'Shell Plan B'; $Price = 10; break;
case 'SSC' : $ShellName = 'Shell Plan C'; $Price = 15; break;
case 'SSD' : $ShellName = 'Shell Plan D'; $Price = 20; break;
}
}
else if ($AShell) {
switch ($AShell) {
case 'ASS' : $ShellName = 'Standard IRCD'; $Price = 15; break;
case 'ASA' : $ShellName = 'Advanced IRCD'; $Price = 20; break;
case 'ASE' : $ShellName = 'Extreme IRCD'; $Price = 25; break;
}
}
else if ($SMedia) {
switch ($SMedia) {
case 'SM1' : $ShellName = 'Streaming Plan 1'; $Price = 12; break;
case 'SM2' : $ShellName = 'Streaming Plan 2'; $Price = 15; break;
case 'SM3' : $ShellName = 'Streaming Plan 3'; $Price = 17; break;
case 'SM4' : $ShellName = 'Streaming Plan 4'; $Price = 17; break;
case 'SM5' : $ShellName = 'Streaming Plan 5'; $Price = 35; break;
}
}
?>
// Data
$From = $_POST['FirstName'] . " " . $_POST['_MidName'] . " " . $_POST['LastName'];
$Sender = $_POST['Email'];
$Message = "
";
$Message .= "First Name: " . $_POST['FirstName'] . "
";
$Message .= "Middle Name: " . $_POST['_MidName'] . "
";
$Message .= "Last Name: " . $_POST['LastName'] . "
";
$Message .= "Address: " . $_POST['Addr1'] . "
";
$Message .= "Address 2: " . $_POST['_Addr2'] . "
";
$Message .= "City: " . $_POST['City'] . "
";
$Message .= "Postcode: " . $_POST['ZIP'] . "
";
$Message .= "Country: " . $_POST['Country'] . "
";
$Message .= "Phone: " . $_POST['_Phone'] . "
";
$Message .= "E-mail: " . $_POST['Email'] . "
";
$To = "dracon@dracon.biz";
$Subject = "Dracon - Shell Order: $ShellName - $$Price";
// Headers
$Headers = "MIME-Version: 1.0\n";
$Headers .= "Content-type: text/html; charset=iso-8859-1\n";
$Headers .= "From: $From <$Sender>\n";
// Sender
mail($To,$Subject,$Message,$Headers);
}
?>