<?php
if(!empty($_POST["send"])) {
	
	$sendername = $_POST["sendername"]; 
    $senderemail = $_POST["senderemail"];
    $sendercontact = $_POST["sendercontact"];
    $senderaddress = $_POST["senderaddress"];
    $dispatchlocation = $_POST["dispatchlocation"];
    $receivername = $_POST["receivername"];
    $receivercontact = $_POST["receivercontact"];
    $receiveremail = $_POST["receiveremail"];
    $receiveraddress = $_POST['receiveraddress'];
    $ftype = $_POST['ftype'];
    $edd = $_POST['edd'];

$con = mysqli_connect('localhost', 'root', '');

mysqli_select_db($con, 'unitcargologistics');
	mysqli_query($con, "INSERT INTO client_details (sendername, senderemail, sendercontact, senderaddress, dispatchlocation, receivername, receivercontact, receiveremail, receiveraddress, ftype, edd) VALUES ('" . $sendername. "', '" . $senderemail. "','" . $sendercontact. "','" . $senderaddress. "', '" . $dispatchlocation. "', '" . $receivername. "','" . $receivercontact. "','" . $receiveremail. "','" . $receiveraddress. "','" . $ftype. "','" . $edd. "')");
	$insert_id = mysqli_insert_id($con);
	//if(!empty($insert_id)) {

	   $type = "success";
	//}

	
}
require_once "index.php";



    
         // force the user to register
       echo "<script>window.location.href='index.php</script>";

    
?>