กรุณาระบุน้ำหนัก <input type="text" name="weight" class="text required"> <select class="textfield" name="unit_weight" type="text" style=" width: 67px; " /> <option value="กรัม">กรัม</option> <option value="กิโลกรัม">กิโลกรัม</option> <option value="ตัน">ตัน</option> </select> <br> <input type="checkbox" name="sd3" value="ไม่ระบุ" class="checkme" /> ไม่ระบุ <script type="text/javascript" src="http://code.jquery.com/jquery-1.5.js"></script> <script> $('.checkme').attr('checked', false); $('.checkme').click(function(){ if($('input[name=weight]').attr('disabled') == false){ $('input[name=weight]').attr('disabled', true); }else{ $('input[name=weight]').attr('disabled', false); } }); $('.checkme').attr('checked', false); $('.checkme').click(function(){ if($('select[name=unit_weight]').attr('disabled') == false){ $('select[name=unit_weight]').attr('disabled', true); }else{ $('select[name=unit_weight]').attr('disabled', false); } }); </script>
<?php $weight = $_REQUEST['weight']; $unit_weight = $_REQUEST['unit_weight']; $sd3 = $_REQUEST['sd3']; if($sd3){ $sql = "INSERT INTO table_name (column1) VALUES ('$unit_weigh'; "; }else{ $sql = "INSERT INTO table_name (column1,column2) VALUES ('$unit_weigh'); "; } $is_save = mysql_query($sql); if($is_save){ echo "<script>window.location='my_file.php'</script>"; }else{ echo "ติดอะไรบางอย่าง"; } ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง