var url = 'list_data.php'; var pmeters = 'page='+ p + '&txtSearch=' + document.getElementById("txtSearch").value + '&email=' + document.getElementById("email").checked + '&surname=' + document.getElementById("surname").checked ;
$txtSearch = $_POST["txtSearch"]; $email = $_POST["email"]; $surname = $_POST["surname"]; if(($email=='false')and($surname=='false')) { $command = "select * from temp.test_table where ((name LIKE '%".$_POST[txtSearch]."%'))"; } else if(($email=='true')and($surname=='true')) { $command = "select * from temp.test_table where ((name LIKE '%".$_POST[txtSearch]."%')and(email!='')and(surname!=''))"; } else if(($email=='true')and($surname=='false')) { $command = "select * from temp.test_table where ((name LIKE '%".$_POST[txtSearch]."%')and(email!=''))"; } else if(($email=='false')and($surname=='true')) { $command = "select * from temp.test_table where ((name LIKE '%".$_POST[txtSearch]."%')and(surname!=''))"; }
$txtSearch = $_POST["txtSearch"]; $email = $_POST["email"]; $surname = $_POST["surname"]; $command = "select * from temp.test_table where name LIKE '%".$_POST[txtSearch]."%' "; if($email=='true') { $command .= " AND email != ''"; } if($surname =='true') { $command .= " AND surname != ''"; }
$fields = array('a1', 'a2', 'a3', .....,'ax'); //อาเรย์ ชื่อฟีลที่อาจเรียกใช้ในการค้น $keyword = $_GET['keyword']; $searches = array(); foreach ($fields as $field) { if($_GET[$field] == 'true') { $searches[] = $field." LIKE '%".$keyword."%'"; } } $sql = "SELECT * FROM XX"; if ($searches) { $sql .= " WHERE ".join(' OR ', $searches); }
$txtSearch = $_POST["txtSearch"]; unset($_POST["txtSearch"]); $command = "select * from temp.test_table where name LIKE '%".$txtSearch."%' "; foreach($_POST as $field){ if($field=='true') { $command .= " AND $field != ''"; } }
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง