This mail function doesn't seem to work.
Maybe I've put it in the wrong place.
Can anyone see it?
<?php session_start();
$_SESSION['custname'] = $_POST['custname'];
$_SESSION['custsurname'] = $_POST['custsurname'];
$_SESSION['robog'] = $_POST['robog'];
$_SESSION['hq8'] = $_POST['hq8'];
$_SESSION['repeater'] = $_POST['repeater'];
$_SESSION['total'] = $_POST['total'];
if(isset($_POST['submit']))
{
$total=0;
$valR1 = $_POST['robog'] * 1550 ;
$total+=$valR1;
$valR2 = $_POST['hq8'] * 1650;
$total+=$valR2;
$valR3 = $_POST['repeater'] * 1004;
$total+=$valR3;
$total1 = $total * 14 / 100;
$Ftotal = $total1 + $total;
$valR4 = $_POST['delivery'];
$Dtotal = $Ftotal + $valR4;
$to = "thys@fullhouse.co.za, $email";
$subject = "RoboGuard Order";
$message = "Thanks you for your order" <br> ""$SESSION['robog']" x Roboguard - $valR1" ;
$message1 = ""$SESSION['robog']" x Roboguard - $valR1";
//mail("thys@fullhouse.co.za, $email",$to,$subject,$message,$message1);
mail($to,$subject,$message,$message1, "From: thys@fullhouse.co.za.co.za");
$conn= @mysql_connect( "localhost", "root", "triadpass" )
or die( "Could not Connect to Database" );
$rs = @mysql_select_db( "roboguard", $conn )
or die( "Could not Select Database" );
$sql = "insert into robo (custname, custsurname, custemail, custworktel , custcell, address, postcode, paymeth, delivery, robog, hq8 , repeater , total , Ftotal , Dtotal)
values ('$custname', '$custsurname', '$custemail', '$custworktel' , '$custcell', '$address', '$postcode', '$paymeth', '$delivery' , '$robog' , '$hq8' , '$repeater' , '$total', '$Ftotal' , '$Dtotal')";
$rs = mysql_query( $sql, $conn )
or die ("Could not execute query1");
if($rs) {
echo("<table aborder=\"2\" align=\"center\">");
echo("<tr>");
echo("<th bgcolor=\"#339933\">Order information has been added successfully for:</th>");
echo("</tr>");
echo("<tr>");
echo("<th bgcolor=\"#339933\">$custname $custsurname</th>");
echo("</tr>");
echo("<tr>");
echo("<th bgcolor=\"#339933\">R $Dtotal</th>");
echo("</tr>");
echo("<tr>");
echo("<td bgcolor=\"339933\">Please allow 24 hours for us to get in contact with you.</td>");
echo("</tr>");
echo("<tr>");
echo("<td bgcolor=\"#339933\">Payment will be taken on despachment of products.</td>");
echo("</tr>");
echo("</table>");
}
else
{
echo ("Could not Add Customer.");
}}
?>