/var/www/onesolution.com.hk/support/customerupdate.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php require("checkuser.php"); ?>
<?
$custid            
$_POST['custid'];
$custname        $_POST['custname'];
$address        htmlspecialchars($_POST['address'], ENT_QUOTES);
$contactperson    $_POST['contactperson'];
$telno            $_POST['telno'];
$email            $_POST['email'];
$status            $_POST['status'];

$creationby        $_SESSION['userid'];
$creationdate    date("Ymdgis");
$updatedby        $_SESSION['userid'];
$updateddate    date("Ymdgis");


include(
"configure.php");


$sql "update CM_CUSTOMER_HDR ";
$sql .= "set custname='$custname', address='$address', contactperson='$contactperson', telno='$telno', email='$email', status=$status, updatedby='$updatedby', updateddate='$updateddate'";
$sql .= "where custid = $custid";

$result mysql_query($sql);
if (!
$result) {
    die(
'Invalid query: ' mysql_error());
}

header("Location: customerlist.php");
?>