include 'management/include/functions.php';
if(isset($_POST['Submit']))
{
extract($_POST);
$enquiry_date = date("Y-m-d H:i:s");
$savequery = mysql_query("INSERT INTO shipment_freight
SET
shipping_mode='$shipping_mode',
coa='$COA',
spot='$SPOT',
num_shipment='$num_shipment',
shipment_year='$shipment_year',
info_name='$info_name',
info_cname='$info_cname',
info_phone='$info_phone',
info_email='$info_email',
loading_port_one='$loading_port1',
lp_one_country='$lp1_country',
lp_one_qntity='$lp1_qntity',
lp_one_loadrate='$lp1_loadrate',
loading_port_two='$loading_port2',
lp_two_country='$lp2_country',
lp_two_qntity='$lp2_qntity',
lp_two_loadrate='$lp2_loadrate',
loading_port_three='$loading_port3',
lp_three_country='$lp3_country',
lp_three_qntity='$lp3_qntity',
lp_three_loadrate='$lp3_loadrate',
discharge_port_one='$discharge_port1',
dp_one_country='$dp1_country',
dp_one_qntity='$dp1_qntity',
dp_one_loadrate='$dp1_loadrate',
discharge_port_two='$discharge_port2',
dp_two_country='$dp2_country',
dp_two_qntity='$dp2_qntity',
dp_two_loadrate='$dp2_loadrate',
discharge_port_three='$discharge_port3',
dp_three_country='$dp3_country',
dp_three_qntity='$dp3_qntity',
dp_three_loadrate='$dp3_loadrate',
starting_date='$Starting_date',
end_laycan_date='$end_laycan_date',
packing='$packing',
quantity_measurement='$Quantity_measurement',
incoterms='$incoterms',
dimensions_type='$Dimensions_Type',
length='$length',
width='$width',
height='$height',
stackable='$Stackable',
hazardous='$Hazardous',
insurance='$Insurance',
message='$message_text',
enquiry_date='$enquiry_date'") or die(mysql_error());
if($savequery){
$to = "info@commodityjunctions.com,support@commodityjunctions.com,nagendra.qms@gmail.com";
$subject = 'Query:Sent By '.$info_name.'';
$headers = "From: $info_email \r\n";
$headers .= "Reply-To: $info_email \r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$message = '
';
$message .= 'Detail Of Sender
';
$message .= 'Shipment Mode :'.$shipping_mode."
";
$message .= 'COA:'.$COA."
";
$message .= 'SPOT :'.$SPOT."
";
$message .= 'Total Number Of Shipments:'.$num_shipment."
";
$message .= 'Shipments of years:'.$shipment_year."
";
$message .= 'Sender Name:'.$info_name."
";
$message .= 'Sender Mail-Id:'.$info_email."
";
$message .= 'Sender Mobile Number:'.$info_phone."
";
$message .= 'Sender Company Name:'.$info_cname."
";
$message .= 'Loading Port 1:'.$loading_port1."
";
$message .= 'Country:'.$lp1_country."
";
$message .= 'Quantity:'.$lp1_qntity."
";
$message .= 'Load Rate:'.$lp1_loadrate."
";
$message .= 'Loading Port 2:'.$loading_port2."
";
$message .= 'Country:'.$lp2_country."
";
$message .= 'Quantity:'.$lp2_qntity."
";
$message .= 'Load Rate:'.$lp2_loadrate."
";
$message .= 'Loading Port 3:'.$loading_port3."
";
$message .= 'Country:'.$lp3_country."
";
$message .= 'Quantity:'.$lp3_qntity."
";
$message .= 'Load Rate:'.$lp3_loadrate."
";
$message .= 'Discharge Port 1:'.$discharge_port1."
";
$message .= 'Country:'.$dp1_country."
";
$message .= 'Quantity:'.$dp1_qntity."
";
$message .= 'Load Rate:'.$dp1_loadrate."
";
$message .= 'Discharge Port 2:'.$discharge_port2."
";
$message .= 'Country:'.$dp2_country."
";
$message .= 'Quantity:'.$dp2_qntity."
";
$message .= 'Load Rate:'.$dp2_loadrate."
";
$message .= 'Discharge Port 3:'.$discharge_port3."
";
$message .= 'Country:'.$dp3_country."
";
$message .= 'Quantity:'.$dp3_qntity."
";
$message .= 'Load Rate:'.$dp3_loadrate."
";
$message .= 'Laycan Start Date:'.$Starting_date."
";
$message .= 'Laycan End Date:'.$end_laycan_date."
";
$message .= 'Packing:'.$packing."
";
$message .= 'Quantity:'.$Quantity_measurement."
";
$message .= 'Incoterms:'.$incoterms."
";
$message .= 'Dimensions Type:'.$Dimensions_Type."
";
$message .= 'Lenth:'.$length."
";
$message .= 'Width:'.$width."
";
$message .= 'Height:'.$height."
";
$message .= 'Stackable:'.$Stackable."
";
$message .= 'Hazardous:'.$Hazardous."
";
$message .= 'Insurance:'.$Insurance."
";
$message .= 'Message:'.$message_text."
";
$message .= '
';
$message .= '';
//echo $message;die;
if(@mail($to, $subject, $message, $headers))
{
//echo "Check your mail";
$msg = "Request send successfully";
}
else
{
//echo "Opps Something went wrong";
$msg = "Opps Something went wrong";
}
}
}
?>