Preview: submit-customer.php
Size: 1.63 KB
/home/urbanman/roadkaraja.in/manager/submit-customer.php
<?php
error_reporting(0);
@session_start();
include("config.php");
$cname=$_POST[cname];
$mobile=$_POST[mobile];
$baddress=$_POST[baddress];
$bdate=$_POST[bdate];
$flag = $_REQUEST[flag];
$mode = $_REQUEST[mode];
$dobmonth = substr($bdate, 5);
$cardtyp=$_POST[cardtyp];
$fueltyp=$_POST[fueltyp];
$branch = $_SESSION[branch];
$companyname=$_POST[companyname];
$owner=$_POST[owner];
$ownermobile=$_POST[ownermobile];
$mobile2=$_POST[mobile2];
$vehicletyp=$_POST[vehicletyp];
$routefrom=$_POST[routefrom];
$routeto=$_POST[routeto];
$urea=$_POST[urea];
$vnumber=$_POST[vnumber];
/***********************************/
$id = $_POST['id'];
//echo $id; exit;
$query_up=sprintf("UPDATE customer SET
cardtyp ='$cardtyp',
vehicle_number='$vnumber',
customer_name='$cname',
customer_mobile='%s',
mobile2='$mobile2',
routefrom='$routefrom',routeto='$routeto',urea='$urea',branch='$branch',companyname='$companyname',
owner='$owner',ownermobile='$ownermobile' WHERE id='%d' ",$mobile,$id);
if(!($resu=mysql_query($query_up))){echo $query_up.mysql_error(); exit;}
$query=sprintf("UPDATE customer_product_point SET
mobile='%s'
WHERE cid='%d' ",$mobile,$id);
if(!($re=mysql_query($query))){echo $query.mysql_error(); exit;}
$query2=sprintf("UPDATE record SET
mobile='%s'
WHERE cid='%d' ",$mobile,$id);
if(!($re3=mysql_query($query2))){echo $query2.mysql_error(); exit;}
header("Location:customer-list.php?flag=up");
exit;
?>
Directory Contents
Dirs: 5 × Files: 59