<?php 
require("php_con.php");

if(isset($_GET['cs_name'])&&isset($_GET['cs_mobile'])&&isset($_GET['cs_nic'])&&isset($_GET['cs_address'])){
	
	$cs_name=mysqli_real_escape_string($connation,$_GET['cs_name']);
	$cs_mobile=(int)mysqli_real_escape_string($connation,$_GET['cs_mobile']);
	$cs_nic=mysqli_real_escape_string($connation,$_GET['cs_nic']);
	$cs_address=mysqli_real_escape_string($connation,$_GET['cs_address']);
	$cs_pin=mysqli_real_escape_string($connation,$_GET['cs_pin_insert']);
	$cs_bill_discount=mysqli_real_escape_string($connation,$_GET['cs_bill_discount']);
	
	mysqli_query($connation,"INSERT INTO
	customer_details (cs_id, cs_name, cs_pin, cs_mobile, cs_nic, cs_address, cs_bill_discount, cs_add_date, cs_add_time)
	VALUES (NULL, '$cs_name', '$cs_pin', '$cs_mobile', '$cs_nic', '$cs_address', '$cs_bill_discount', '$current_date', '$current_time')");
	
	mysqli_query($GLOBALS['connation'],"UPDATE setting SET setting_value=setting_value+1 WHERE setting_text='customer_pin'");
}
?>