|
|
|
ทำไมบาง filed ไม่ยอมเข้าไปใน sql table ครับ ไม่เข้า sql ครับ ผมตกอะไรไปหรือเปล่า |
|
|
|
|
|
|
|
Code (PHP)
<? if($_POST["action"]=="addnew"){
$insert["member_id"] = "'".$_SESSION["System_Session_User_ID"]."'";
$insert["type_reservation"] = "'".$_POST["Type_Reservation"]."'";
$insert["absolutemember"] = "'".$_POST["absolutemember"]."'";
$insert["absolutemember_no"] = "'".$_POST["absolutemember_no"]."'";
$insert["number_guests"] = "'".$_POST["numguests"]."'";
$insert["remark1"] = "'".$_POST["remark1"]."'";
$insert["remarkby1"] = "'".$_POST["remarkby1"]."'";
$insert["remark2"] = "'".$_POST["remark2"]."'";
$insert["remarkby2"] = "'".$_POST["remarkby2"]."'";
$insert["Guest1name"] = "'".$_POST["Guest1name"]."'";
$insert["Guest1age"] = "'".$_POST["Guest1age"]."'";
$insert["Guest1country"] = "'".$_POST["Guest1country"]."'";
$insert["Guest1occupation"] = "'".$_POST["Guest1occupation"]."'";
$insert["Guest1income"] = "'".$_POST["Guest1income"]."'";
$insert["Guest1language"] = "'".$_POST["Guest1language"]."'";
$insert["Guest2name"] = "'".$_POST["Guest2name"]."'";
$insert["Guest2age"] = "'".$_POST["Guest2age"]."'";
$insert["Guest2country"] = "'".$_POST["Guest2country"]."'";
$insert["Guest2occupation"] = "'".$_POST["Guest2occupation"]."'";
$insert["Guest2income"] = "'".$_POST["Guest2income"]."'";
$insert["Guest2language"] = "'".$_POST["Guest2language"]."'";
$insert["Guest3name"] = "'".$_POST["Guest3name"]."'";
$insert["Guest3age"] = "'".$_POST["Guest3age"]."'";
$insert["Guest3country"] = "'".$_POST["Guest3country"]."'";
$insert["Guest3relation"] = "'".$_POST["Guest3relation"]."'";
$insert["Guest4name"] = "'".$_POST["Guest4name"]."'";
$insert["Guest4age"] = "'".$_POST["Guest4age"]."'";
$insert["Guest4country"] = "'".$_POST["Guest4country"]."'";
$insert["Guest4relation"] = "'".$_POST["Guest4relation"]."'";
$insert["relation_person2nd"] = "'".$_POST["Relationship1stand2nd"]."'";
$insert["Married"] = "'".$_POST["Married"]."'";
$insert["Married_year"] = "'".$_POST["Marriedyear"]."'";
$insert["living_together"] = "'".$_POST["Living"]."'";
$insert["living_together_year"] = "'".$_POST["Livingyear"]."'";
$insert["home_owner"] = "'".$_POST["Homeowner"]."'";
$insert["car_owner"] = "'".$_POST["Carowner"]."'";
$insert["credit_card"] = "'".$_POST["Creditcard"]."'";
$insert["holiday_home"] = "'".$_POST["Holidayowner"]."'";
$insert["vacation_club"] = "'".$_POST["Vacationmember"]."'";
$insert["club_name"] = "'".$_POST["clubname"]."'";
$insert["member_type"] = "'".$_POST["club_type"]."'";
$insert["when_join"] = "'".$_POST["whenjoinclub"]."'";
$insert["where_join"] = "'".$_POST["wherejoinclub"]."'";
$insert["Addition_info"] = "'".$_POST["clubmore"]."'";
$insert["contact_address"] = "'".$_POST["contact_address"]."'";
$insert["contact_city"] = "'".$_POST["contact_city"]."'";
$insert["contact_state"] = "'".$_POST["contact_province"]."'";
$insert["contact_zip"] = "'".$_POST["contact_zipcode"]."'";
$insert["contact_country"] = "'".$_POST["contact_country"]."'";
$insert["contact_home_tel"] = "'".$_POST["home_phone"]."'";
$insert["contact_work_tel"] = "'".$_POST["work_phone"]."'";
$insert["contact_mobile"] = "'".$_POST["gmobile_phone"]."'";
$insert["contact_fax"] = "'".$_POST["contact_fax"]."'";
$insert["contact_email"] = "'".$_POST["contact_email"]."'";
$insert["booking_1st_date"] = "'".str_replace("/","-",$_POST["date1"])."'";
$insert["booking_2nd_date"] = "'".str_replace("/","-",$_POST['date2'])."'";
$insert["booking_3rd_date"] = "'".str_replace("/","-",$_POST["date3"])."'";
$insert["Length_stay"] = "'".$_POST["Length_stay"]."'";
$insert["Addition_comment"] = "'".$_POST["Comments"]."'";
$insert["reservation_language"] = "'".$_SESSION['System_Session_Language']."'";
$insert["create_date"] = "NOW()";
$insert["status"] = "'On process'";
$sql="INSERT INTO ".$System_TableName_Reservation." (".implode(",",array_keys($insert)).") VALUES (".implode(",",array_values($insert)).")";
mysql_query($sql);
?>
$insert["absolutemember"] = "'".$_POST["absolutemember"]."'";
$insert["absolutemember_no"] = "'".$_POST["absolutemember_no"]."'";
$insert["remark1"] = "'".$_POST["remark1"]."'";
$insert["remarkby1"] = "'".$_POST["remarkby1"]."'";
$insert["remark2"] = "'".$_POST["remark2"]."'";
$insert["remarkby2"] = "'".$_POST["remarkby2"]."'";
ไม่เข้า sql ครับ ผมตกอะไรไปหรือเปล่า
Tag : - - - -
|
|
|
|
|
|
Date :
2010-04-23 14:53:06 |
By :
designbyrod |
View :
939 |
Reply :
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ใครพอรู้ขอคำเเนะนำหน่อยครับ มันไม่ยอมวิ่งเข้าไปใน sql เเต่ตัวอื่นก็ ทำงานดีปกติครับ
|
|
|
|
|
Date :
2010-04-23 16:16:14 |
By :
designbyrod |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ดูชื่อ input ดีหรือยังครับ ไม่งั้นก็ลอง print_r($_POST); ออกมาดูว่ามันมาหรือเปล่า
|
|
|
|
|
Date :
2010-04-23 22:06:09 |
By :
plakrim |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ได้เเล้วครับ ตรง code php ไม่ผิด เเต่ผมใส่ input ใน html ไม่ถูกครับ จริงๆ เเล้วใส่ถูก เเต่ใน hidden ข้อมูล ผมดันใส่ DISABLED ไว้ เลยไม่วิ่งเข้าครับ ขอบคุณมากครับ
|
|
|
|
|
Date :
2010-04-25 17:03:03 |
By :
designbyrod |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 01
|