|
 |
|
ดูโค้ดให้หน่อยคะ ^^ ช่วยดูโค้ดให้หน่อยคะ ทำไมมันไม่ลงดาต้าเบสก้อไม่รุ้คะ ตรง Idcard ค่าไม่อัพเดทในดาต้าเบสให้ |
|
 |
|
|
 |
 |
|
Code (PHP)
?>
if(isset($_POST['cmd_Edit'])){
$P_id =118;
$Prefix = $_POST['new_radioprefix'];
$Name = $_POST['new_Name'];
$Birthdate = ($_POST['new_Years']-543)."-".(($_POST['new_Month'] < 10) ? "0" : ""). $_POST['new_Month']."-".(($_POST['new_Date'] < 10) ? "0" : "")
.$_POST['new_Date'];
echo $Birthdate;
$Age = $_POST['new_Age'];
$Idcard = $_POST['new_Idcard'];
$Nationality = $_POST['new_Nation'];
$Religious = $_POST['new_Relig'];
$Address = $_POST['new_Address'];
$Tel = $_POST['new_Tel'];
$Mobile = $_POST['new_Mobile'];
$Fax = $_POST['new_Fax'];
$Email = $_POST['new_Email'];
$Education = $_POST['new_Educat'];
$Course = $_POST['new_Course'];
$Institution = $_POST['new_Insti'];
$sql_update = "UPDATE `datatest`.`data` SET `Prefix` = '".$Prefix."',`Name` = '".$Name."',
`Birthdate` = '".$Birthdate."',`Age` = '".$Age."',`Idcard` = '".$Idcard."',
`Nationality` = '".$Nationality."',`Religious` = '".$Religious."',
`Address` = '".$Address."',`Tel` = '".$Tel."',`Mobile` = '".$Mobile."',
`Fax` = '".$Fax."',`Email` = '".$Email."',`Education` = '".$Education."',
`Course` = '".$Course."',`Institution` = '".$Institution."'
WHERE `data`.`P_id` ='".$P_id ."'";
echo $sql_update;
$update = mysql_query($sql_update);
if($update){
echo"<script>alert('แก้ไขข้อมูลเรียบร้อยแล้ว ');window.location='Show1.php';</script>";
}
}
else
echo "ไม่สามารถแก้ไขข้อมูลลงตาราง DATA ได้ !!! #CAN NOT EDIT YOUR DATA IN TABLE DATA !!! #";
mysql_close ($conn );
?>
ช่วยดูโค้ดให้หน่อยคะ ทำไมมันไม่ลงดาต้าเบสก้อไม่รุ้คะ ตรง Idcard ค่าไม่อัพเดทในดาต้าเบสให้ Nationality Religious Education ค่ามันกลายเป็น 0,1, 2, 3 ตรง Birthdate ค่าก้อจะกลายเป็น0000-00-00 ไปเลยคะ
Tag : - - - -

|
|
 |
 |
 |
 |
Date :
2009-12-01 09:55:49 |
By :
kakaka |
View :
842 |
Reply :
1 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Code (PHP)
echo $sql_update;
ได้ค่าอะไร ก็ได้ผลออกมาอย่างนั้นแหละครับ
|
 |
 |
 |
 |
Date :
2009-12-01 10:12:31 |
By :
webmaster |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 04
|