$id_edit=$_POST['id_edit']; $q_title=$_POST['q_title']; $q_detail=$_POST['q_detail']; $sql="select q_id from question where q_title='$q_title'"; $result=mysql_db_query($dbname,$sql); $num=mysql_num_rows($result); if ($q_title=="" ) { echo "<h3>กรุณากรอกรายละเอียดให้ครบด้วยนะครับ<h3>"; echo "<meta Http-equiv='refresh' Content='2; Url=admin_question.php'>"; exit(); } if($num>0) { echo "<h3>หัวข้อนี้ซ้ำ</h3>"; echo "<meta Http-equiv='refresh' Content='2; Url=admin_question.php'>"; exit(); } $sql="update question set q_title='$q_title',q_detail='$q_detail' where q_id='$id_edit' "; $result=mysql_db_query($dbname,$sql); if ($result) { echo "<meta Http-equiv='refresh' Content='0; Url=admin_question.php'>"; } else { echo "<h3>ไม่สามารถแก้ไขข้อมูลได้</h3>"; echo "<meta Http-equiv='refresh' Content='2; Url=admin_question.php'>"; } mysql_close(); ?>
if($num>0) { echo "<h3>หัวข้อนี้ซ้ำ</h3>"; echo "<meta Http-equiv='refresh' Content='2; Url=admin_question.php'>"; exit(); } else{ $sql="update question set q_title='$q_title',q_detail='$q_detail' where q_id='$id_edit' "; $result=mysql_db_query($dbname,$sql); if ($result) { echo "<meta Http-equiv='refresh' Content='0; Url=admin_question.php'>"; } else { echo "<h3>ไม่สามารถแก้ไขข้อมูลได้</h3>"; echo "<meta Http-equiv='refresh' Content='2; Url=admin_question.php'>"; } }
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง