<select name="type" id="type"> <option>---------------กรุณาเลือกประเภท----------------</option> <? include "connect.php"; $sql="select type_id,type_name from tbl_type "; $result =mysql_db_query($dbname,$sql) ; while ($row=mysql_fetch_array($result)){ ?> <option value="<?=$row['type_id']?>"> <?=$row['type_name']?> </option> <? } ?> </select>
<select name="type" id="type"> <option value='0'>---------------กรุณาเลือกประเภท----------------</option> <? include "connect.php"; $sql="select type_id,type_name from tbl_type "; $result =mysql_db_query($dbname,$sql) ; while ($row=mysql_fetch_array($result)){ ?> <option value="<?=$row['type_id']?>"> <?=$row['type_name']?> </option> <? } ?> </select> <?php if($_POST[type]=='0'){ $sql="select * from tb_name"; }else{ //เงื่อนไขต่อไป } ?>
<? $strSQL = "SELECT * FROM table WHERE 1 "; if($_POST["txt1"] != "") { $strSQL .= " AND F1 = '".$_POST["txt1"]."' "; } if($_POST["txt2"] != "") { $strSQL .= " AND F2 = '".$_POST["txt2"]."' "; } ?>
<? include "connect.php"; if ($_POST[type]=='0'){ $sql = "SELECT * FROM tbl_position order by com_id desc "; $objQuery = mysql_query($sql) or die ("Error Query [".$sql."]"); $Num_Rows = mysql_num_rows($objQuery); }else{ $sql=" select * from tbl_position where com_type like '%$_POST[type]%' order by com_id desc "; $objQuery = mysql_query($sql) or die ("Error Query [".$sql."]"); $Num_Rows = mysql_num_rows($objQuery); $Per_Page =10; // Per Page $Page = $_GET["Page"]; if(!$_GET["Page"]) { $Page=1; } $Prev_Page = $Page-1; $Next_Page = $Page+1; $Page_Start = (($Per_Page*$Page)-$Per_Page); if($Num_Rows<=$Per_Page) { $Num_Pages =1; } else if(($Num_Rows % $Per_Page)==0) { $Num_Pages =($Num_Rows/$Per_Page) ; } else { $Num_Pages =($Num_Rows/$Per_Page)+1; $Num_Pages = (int)$Num_Pages; } $sql=" order by com_id desc LIMIT $Page_Start , $Per_Page"; $objQuery = mysql_query($sql); } while($rs= mysql_fetch_array($objQuery )){ มันบอกผิดบรรทัดนี่ครับ $id=$rs['com_id']; $position=$rs['com_position']; $edate=$rs['com_edate']; $refcom=$rs['ref_com']; $comdetail1=$rs['com_detail1']; $recieve=$rs['com_receive']; $salary=$rs['com_salary']; $img=$rs['com_img']; $sql="select * from tbl_com where com_id='$refcom' "; $query=mysql_query($sql); $result=mysql_fetch_array($query); $comdetail=$rs['com_detail']; $cname=$rs['com_name']; $pic=$rs['com_pic']; ?> <tr valign="middle" class="font1"> <td width="39" height="40" align="center" background="admin/pic/bg.png" class="font1"><span class="e"> <?=$id?> </span></td> <td width="246" height="40" align="center" background="admin/pic/bg.png" class="linkstyle02"><?=$position?></td> <td width="338" height="40" align="left" background="admin/pic/bg.png" class="linkstyle02"><?=$comdetail1?></td> <td width="120" height="40" align="center" background="admin/pic/bg.png" class="linkstyle02"><?=$recieve?> อัตรา </td> <td width="145" height="40" align="center" background="admin/pic/bg.png" class="linkstyle02"><?=$salary?></td> <td width="84" height="40" align="center" background="admin/pic/bg.png" class="linkstyle02"><p><? echo "<a href='javascript:openwindow3(\"$id\");'>รายละเอียด</a>";?><br /> </p></td> </tr> <? } ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง