<?php include 'connection.php';
session_start();
if (!isset($_SESSION['is_logged_in'])) {
    header("Location:login.php");
    die();
    }
?>

<?php 
$querylogin = "select * from staff_login where username = '". $_SESSION["LOGIN_NAME"]."' AND password = '".$_SESSION["EMPLOYEE_PASSWORD"]."'";
$resultlogin = mysql_query($querylogin,$conn);
while($row=mysql_fetch_array($resultlogin))
{
$Designation = $row['designation'];
$staff_name = $row['staff_name'];

}
?>
<?php 
date_default_timezone_set('Asia/Calcutta');
$today = date("Y-m-d");
$time = date("h:i A"); 
$currentyear = date("Y");

$customer_id = $_REQUEST['customer_id'];

$id = $_REQUEST['id'];


//echo $_POST['cntcount2'];
$party_name = $_POST['party_name'];
$sub_customer_id = $_POST['sub_customer_id'];
$address = $_POST['address'];
$phone_no = $_POST['phone_no'];
$email = $_POST['email'];


$query2f = "insert into third_customer_master (party_name,sub_customer_id,address,phone_no,email_id,customer_id,id) values ('$party_name','$sub_customer_id','$address','$phone_no','$email','$customer_id','$id')";
//echo $query2f;
$rf=mysql_query($query2f,$conn);



//echo $query11;


//exit();

?>
<script>
javascript:window.location.href="other_sub_customer.php?customer_id=<? echo $customer_id ?>&&id=<? echo $id?>";
</script>		
