<?php
include("config.inc.php") ;
/* add by kergrit(redthird.com) for compatible global variable off/on php.ini */
$name = $_POST['name'];
$date = $_POST['date'];
$month = $_POST['month'];
$year = $_POST['year'];
$age = $_POST['age'];
$sex = $_POST['sex'];
$address = $_POST['address'];
$amper = $_POST['amper'];
$province = $_POST['province'];
$zipcode = $_POST['zipcode'];
$phone = $_POST['phone'];
$education = $_POST['education'];
$work = $_POST['work'];
$email = $_POST['email'];
$Submit2 = $_POST['Submit2'];
$member_id = $_POST['member_id'];
/* end of add */
$signup = date("j/n/").(date("Y")+543) ;
$name = htmlspecialchars($name) ;
$address = htmlspecialchars($address) ;
$zipcode = htmlspecialchars($zipcode) ;
$phone = htmlspecialchars($phone) ;
$sql[0] = "update member set name='$name' where member_id='$member_id' ";
$sql[1]= "update member set sex='$sex' where member_id='$member_id' ";
$sql[2] = "update member set date='$date' where member_id='$member_id' ";
$sql[3] = "update member set month='$month' where member_id='$member_id' ";
$sql[4] = "update member set year='$year' where member_id='$member_id' ";
$sql[5] = "update member set work='$work' where member_id='$member_id'";
$sql[6] = "update member set age='$age' where member_id='$member_id' ";
$sql[7] = "update member set email='$email' where member_id='$member_id' ";
$sql[8] = "update member set address='$address' where member_id='$member_id' ";
$sql[9] = "update member set amper='$amper' where member_id='$member_id' ";
$sql[10] = "update member set province='$province' where member_id='$member_id' ";
$sql[11] = "update member set zipcode ='$zipcode' where member_id='$member_id' ";
$sql[12] = "update member set phone='$phone' where member_id='$member_id' ";
$sql[13] = "update member set education='$education' where member_id='$member_id' ";
$sql[14] = "update member set work='$work' where member_id='$member_id' ";
for($i=0;$i<15;$i++) {
$result = mysql_query($sql[$i]) or die("Err program") ;
}
if($result) {
echo "<br><br><center><font size=\"3\" face='MS Sans Serif'><b>รายละเอียดของคุณ ได้ถูกบันทึกใหม่แล้วครับ</b></font></center>" ;
echo "<meta http-equiv='refresh' content='4; url=member_detail.php'>" ;
}
?>