<?php ob_start(); ?>
	<!DOCTYPE html>
	<html>
	<?php include "layouts/db_connect.php";
				session_start('ERP');
				
				if($_SESSION['uname']==""&&$_SESSION['pwd']=="")
				{
				
					header("location:index.php");
				}
				
	if(isset($_SESSION['code'])) {
	  $code = $_SESSION['code'];
	  $scode = $_SESSION['code'];
	   $mfin = $_SESSION['mfin'];
		$staff = $_SESSION['name'];
		 $postt = $_SESSION['postt'];
	}
							if(isset($_POST))
							{ 
								
								extract($_POST);
									$name = strtoupper($name);
			$fname = strtoupper($fname);
			$profession = strtoupper($profession);
			$co = strtoupper($co);
			$co01 = strtoupper($co01);
			$co02 = strtoupper($co02);
			$coaland = strtoupper($coaland);
			$lmark = strtoupper($lmark);
			$address = strtoupper($address);
			$address1 = strtoupper($address1);
			$address2 = strtoupper($address2);
			$oaddress = strtoupper($oaddress);
			$oaddress1 = strtoupper($oaddress1);
			$oaddress2 = strtoupper($oaddress2);
			$cobname = strtoupper($cobname);
			$cobname2 = strtoupper($cobname2);
				$remarks = strtoupper($remarks);
				
				$idd = $idd;
								
								$hpl = $hp1;

								
			
				$selected_date2=$hpdate;
		  	$selected_date=strtotime( $selected_date2 );
		$hpdate = date( 'd-m-Y', $selected_date );
		
			$hpdate5 = date( 'Y-m-d', $selected_date );
			$month = date( 'm', $selected_date );
			$day = date( 'd', $selected_date );
				$year = date( 'Y', $selected_date );
				$selected_date22=$hpdate2;
		  	$selected_date222=strtotime( $selected_date22 );
				$hpdate2 = date( 'd-m-Y', $selected_date222 );
				
				date_default_timezone_set('Asia/Kolkata');
$date33 = date('h:i:s a m/d/y');
$dddttt =  date('h:i:s a d/m/y', strtotime($date33));	
$insert=mysqli_query($conn, "update customerdetails set hpl='$hp',dd='$day',mm='$month',yy='$year',dob='$dob',address1='$address1',address2='$address2',lmark='$lmark',fname='$fname',area='$area',hpdate2='$hpdate2',hpdate5='$hpdate5',defamt='$defamt',model='$model',color='$color',hpamount='$hpamount',inter='$inter',hpdate='$hpdate',duemnt='$duemnt',dueamt='$dueamt',interest='$interest',total='$total',name='$name',pno='$pno',address='$address' where id='$idd'");

																																																																																																																																																																																																																																																				
									if($insert)
								{
							header("Location:index2.php");	
																
								}
								else
								{
									echo "Failure";
								}
							}
?>
</html>