 |
|
เพิ่มข้อมูลลงฐานข้อมูลไม่ได้ครับ ไม่รู้แก้ไงช่วยหน่อยครับ มีโค้ดเก่าเอามาแปลง แต่ไม่ผ่านครับ มือใหม่มากๆ
[
head]Code (PHP)[/head]
<?php
if(strcmp($_POST['code_input'],$_POST['code_hidden'])==0) //การยืนยันการกรอกรหัสตามรูปภาพ
{
}else
{
echo "<script>alert('การยืนยันรหัสรูปภาพของคุณไม่ถูกต้อง กรุณาทำรายการใหม่อีกครั้ง')</script>";
/*echo " <script> javascript:history.back(); </script>";*/
echo"<script language='javascript'>window.location.href='index.php'</script>";
exit();
}
include('connect.php');
$sql="insert into appjob(txtdatejob,txtjob,txtsalary,selectname,txtname,txtsername,txtage,txtweight,txthige,txtbirthday,txtrace,txtnationality,txtreligion,txthome,txtmuu,txtsoi,txtroad,txtdistrict,txtthedistrict,txtprovince,txtpost,txtphone1,txtphone2,txtemail,txtuniversity,txteducation,txtkana,txtgpa,txtyearin,txtsaka,txtyearout,txtlanguage1,selectsay1,selectread1,selectwrite1,txtlanguage2,selectsay2,selectread2,selectwrite2,radiobuttoncar,radiobuttonmortci,txtorter,computer,txtorter1)
values('$idjob','".$_POST['txtdatejob']."','".$_POST['txtjob']."','".$_POST['txtsalary']."','".$_POST['selectname']."','".$_POST['txtname']."','".$_POST['txtsername']."','".$_POST['txtage']."','".$_POST['txtweight']."','".$_POST['txthige']."','".$_POST['txtbirthday']."','".$_POST['txtrace']."','".$_POST['txtnationality']."','".$_POST['txtreligion']."','".$_POST['txthome']."','".$_POST['txtmuu']."','".$_POST['txtsoi']."','".$_POST['txtroad']."','".$_POST['txtdistrict']."','".$_POST['txtthedistrict']."','".$_POST['txtprovince']."','".$_POST['txtpost']."','".$_POST['txtphone1']."','".$_POST['txtphone2']."','".$_POST['txtemail']."','".$_POST['txtuniversity']."','".$_POST['txteducation']."','".$_POST['txtkana']."','".$_POST['txtgpa']."','".$_POST['txtyearin']."','".$_POST['txtsaka']."','".$_POST['txtyearout']."','".$_POST['txtlanguage1']."','".$_POST['selectsay1']."','".$_POST['selectread1']."','".$_POST['selectwrite1']."','".$_POST['txtlanguage2']."','".$_POST['selectsay2']."','".$_POST['selectread2']."','".$_POST['selectwrite2']."','".$_POST['radiobuttoncar']."','".$_POST['radiobuttonmortci']."','".$_POST['txtorter']."','".$_POST['computer']."','".$_POST['txtorter1']."')";
$rs=$db->Execute($sql); //ติดบรรทัดนี้ครับ
if($rs){
echo "<script>
alert('บันทึกข้อมูลเรียบร้อยแล้ว');
window.location='index.php'
</script>";
}
?>
Tag : PHP
|
|
 |
 |
 |
 |
Date :
2011-12-21 15:25:32 |
By :
montree104 |
View :
965 |
Reply :
4 |
|
 |
 |
 |
 |
|
|
|
 |