<form class="request-info clearfix" name="AddPform" id="AddPform" method="post" enctype="multipart/form-data" onSubmit="returnsendata();" /> <div class="full-row"> <label for="cat">เลือกภาษา:</label> <div class="input-select"> <select name="langid" id="langid" class="postform"> <option/>-- เลือกภาษา -- <?php include 'svn/conn.php'; $sql='select * from language '; $result=mysql_query($sql); while($row=mysql_fetch_array($result)) { $langid=$row['langid']; $name=$row['name']; print' <option name="langid" value="'.$langid.'" />'.$name.''; } ?> </select> </div> <!-- /.input-select --> </div> <!-- /.full-row --> <div class="full-row"> <label for="cat2">เลือกเรื่องติดต่อ:</label> <div class="input-select"> <select name="subject" id="subject" class="postform"> <option/>-- เลือกรายการ -- <option class="level-0" name="subject" value="สมัครเรียน" />สมัครเรียน <option class="level-0" name="subject" value="ติดต่อสอบถาม" />ติดต่อสอบถาม <option class="level-0" name="subject" value="แจ้งใช้งาน" />แจ้งใช้งาน <option class="level-0" name="subject" value="อื่นๆ" />อื่นๆ </select> </div> <!-- /.input-select --> </div> <!-- /.full-row --> <div class="full-row"> <label for="yourname">ชื่อ-นามสกุล:</label> <input type="text" id="fullname" name="fullname" /> </div> <!-- /.full-row --> <div class="full-row"> <label for="yourname">เบอร์โทรติดต่อ:</label> <input type="text" id="tell" name="tell" /> </div> <!-- /.full-row --> <div class="full-row"> <div class="submit_field"> <span class="small-text pull-left">ส่งข้อมูลเพื่อรอการติดต่อกลับ</span> <input class="mainBtn pull-right" type="submit" name="Submit" id="Submit" value="ส่งข้อมูล" /> </div> <!-- /.submit-field --> </div> <!-- /.full-row --> <script language="javascript"> function check() { if(document.checkForm.langid.value=="") { alert("กรุณาเลือกภาษาใช้งานด้วยครับ") ; document.checkForm.langid.focus() ; return false ; } else if(document.checkForm.subject.value=="") { alert("กรุณาเลือกเรื่องที่ติดต่อด้วยครับ") ; document.checkForm.subject.focus() ; return false ; } else if(isNaN(document.checkForm.fullname.value)) { alert("กรุณากรอกชื่อ-สกุลด้วยครับ") ; document.checkForm.fullname.focus() ; return false ; } else if(document.checkForm.tell.value=="") { alert("กรุณากรอกเบอร์โทรด้วยครับ") ; document.checkForm.tell.focus() ; return false ; }else if(isNaN(document.checkForm.tell.value)) { alert("กรุณากรอกด้วยตัวเลขเท่านั้นครับ") ; document.checkForm.tell.focus() ; return false ; } else return true ; } </script> <?php include "svn/conn.php"; if(isset ($_POST['Submit'])) { $langid=$_POST['langid']; $subject=$_POST['subject']; $fullname=$_POST['fullname']; $tell=$_POST["tell"]; $time=time(); $sql="INSERT INTO message (langid,subject,fullname,tell,times) VALUES ('$langid','$subject','$fullname','$tell','$time')"; if (!mysql_query($sql)) { die('Error: ' . mysql_error()); }else{ echo' <div id="dialog" title="แจ้งผลการทำงาน"> <p>เพิ่มข้อมูลเสร็จเรียบร้อยแล้วครับ <br/> ปิดหน้าต่างได้เลยครับ</p> </div> '; } } ?> </form>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง