รบกวนหน่อยนะค่ะ คืออยากทำค้นหา+แบ่งหน้า แต่ทำไม่ผ่านซักที

สำหรับผู้ที่ เริ่มต้น Programming - PHP มีอะไร แนะนำ หรือข้อสงสัยต้องบอร์ด นี้ น่ะค่ะ คนที่มีความรู้ แบ่งปันคนอื่นบ้างนะ

Moderator: phpbb, mindphp, ผู้ดูแลกระดาน

ตอบกลับโพส
ภาพประจำตัวสมาชิก
tuktababy085
phpBBThailand Newbie
phpBBThailand Newbie
โพสต์: 2
ลงทะเบียนเมื่อ: 03 พ.ย. 2014, 22:34

รบกวนหน่อยนะค่ะ คืออยากทำค้นหา+แบ่งหน้า แต่ทำไม่ผ่านซักที

โพสต์ โดย tuktababy085 »

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<style type="text/css">
<!--
.style1 {font-family: Geneva, Arial, Helvetica, sans-serif}
.style2 {
font-size: 12px;
font-family: "TH Baijam";
font-weight: bold;
}
.style5 {
font-size: 36px;
font-family: "TH Baijam";
}
.style7 {font-size: 24px}
a:link {
color: #0000CC;
text-decoration: underline;
}
a:visited {
color: #0000CC;
text-decoration: underline;
}
a:hover {
color: #FF0000;
text-decoration: none;
}
a:active {
color: #0000CC;
text-decoration: underline;
}
.style24 {font-size: 24px}
.style26 {
font-size: 36px;
color: #000099;
font-weight: bold;
font-family: "TH Baijam";
}
.style29 {font-family: "TH Baijam"}
.style36 {font-size: 18px}
.style37 {
font-family: "TH Baijam";
font-size: 22px;
font-weight: bold;
}
.style38 {color: #FFFFFF}
.style43 {font-size: 22px}
.style44 {color: #FFFFFF; font-family: "TH Baijam"; font-weight: bold; font-size: 22px; }
.style33 {font-size: 22px; font-family: "TH Baijam"; }
.style46 {color: #FFFFFF; font-family: "TH Baijam"; font-size: 22px; }
-->
</style>
</head>

<body>
<center>
<table width="1000" border="0" cellpadding="0" cellspacing="0" bgcolor="#000099">
<!--DWLayoutTable-->
<tr>
<td height="150" colspan="3" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="1000" height="150" valign="top"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shoc ... n=6,0,29,0" width="1000" height="150">
<param name="movie" value="image/head2.swf">
<param name="quality" value="high">
<embed src="image/head2.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="1000" height="150"></embed>
</object></td>
</tr>
</table></td>
</tr>
<tr>
<td height="15" colspan="3" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#000099">
<!--DWLayoutTable-->
<tr>
<td height="14"></td>
</tr>
<!--DWLayoutTable-->
<tr>
<td width="1000" height="1"></td>
</tr>
</table></td>
</tr>
<tr>
<td width="60" height="420">&nbsp;</td>
<td width="880" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<!--DWLayoutTable-->
<tr>
<td width="920" height="420" valign="top"><p align="center"><span class="style26">ค้นหาข้อมูลนายจ้าง</span><span class="style1 style2 style5"><br>
<span class="style7"><img src="image/Untitled-2.jpg" width="872" height="20"></span></span>
</p>
<form id="form1" name="form1" method="post" action="searchnayjang.php">
<div align="center">
<p class="style1 style2 style5"><span class="style24">ค้นหาข้อมูลนายจ้างจากชื่อหรือรหัสนายจ้าง : </span><span class="style24">
<input name="txt_search" type="text" value="<?=$_POST['txt_search']?>" size="50" />
&nbsp;
<input name="Search" type="submit" value="ค้นหา" />
</span></p>
</div>
</form> <p>&nbsp;
<?
// เชื่่อมต่อฐานข้อมูล
$host="localhost"; // กำหนด host
$username="root"; // กำหนด username
$pass_word="1234"; // กำหนด Password
$db="job"; // กำหนดชื่อฐานข้อมูล
$Conn = mysql_connect( $host,$username,$pass_word) or die ("ติดต่อฐานข้อมูลไม่ได้");// ติดต่อฐานข้อมูล
mysql_query("SET NAMES utf8",$Conn); // set กำหนดมาตราฐาน
mysql_select_db($db) or die("เลือกฐานข้อมูลไม่ได้"); // เลือกฐานข้อมูล
$sql="SELECT*FROM nayjang";
$sqlresult=mysql_query($sql);
echo "จำนวนนายจ้างทั้งหมด ".mysql_num_rows($sqlresult)." คน";
?>
</p>
<table width="880" border="1">
<tr bgcolor="#666666">
<th>
<div align="center" class="style38 style31 style29 style43"><strong>ลำดับที่</strong></div></th>
<th>
<div align="center" class="style33 style37 style38">รหัสนายจ้าง</div></th>
<th>
<div align="center" class="style44">ชื่อสถานประกอบการ</div></th>
<th><span class="style44">ประเภทกิจการ</span></th>
<th><span class="style44">โทรศัทพ์</span></th>
<th>
<div align="center" class="style44">แก้ไข</div></th>
<th width="46">
<div align="center" class="style46">ดู</div></th>
<th width="51">
<div align="center" class="style46">ลบ</div></th>
</tr>



<?php
if(!$page or $page==1){
$page=0;
} else{
$page=($page *$limit)-$limit;
}
$link="";
for($i=1;$i<=$sum_page;$i++) {
$link.="[<a href='?page=$i'>".$i."</a>]";
}//การส่งค่าแบบ GET

echo $link="Page : ".$link;
$sql = "SELECT * FROM resume limit $page,$limit";
$re = mysql_query($sql);//การเรียกใช้ข้อมูลจากฐานข้อมูลมาใช้งานโดยกำหนดค่าการเรียกใช้

?>
<?php
while($row= mysql_fetch_assoc($re))// คำสั่งให้แสดงข้อมูล
{
?>



<tr>
<td height="27"><?=$row_show['num']?> <div align="center"></div></td>
<td><?=$row_show['id_cs']?> <div align="center"></div></td>
<td><?=$row_show['Name']?>
<div align="center"></div></td>
<td><?=$row_show['type']?>
<div align="center"></div>
<div align="center"></div></td>
<td><?=$row_show['ph_cs']?>
<div align="center"></div>
<div align="center"></div></td>
<td><div align="center"><span class="style33"><a href="editnayjang.php?id_cs=<?=$row_show['id_cs']?>">Edit</a></span></div></td>
<td><center class="style33">
<a href="showdatanayjang.php?id_cs=<?=$row_show['id_cs']?>">Show</a>
</center></td>
<td><center class="style33">
<a href="deletenayjang.php?id_cs=<?=$row_show['id_cs']?>">Delete</a>
</center></td>

<?
}

?>


</tr>
</table>


<p align="center">&nbsp; </p>
<p align="right"><span class="style1 style2 style5 style36"><span class="style2 style29 style43"><a href="site/jawnatee/indexjawnatee.php">ย้อนกลับ...<br>

</a> </span></span> </p></td>
</tr>
</table></td>
<td width="60">&nbsp;</td>
</tr>
<tr>
<td height="15" colspan="3" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#000099">
<!--DWLayoutTable-->
<tr>
<td width="1000" height="15"></td>
</tr>
</table></td>
</tr>
<tr>
<td height="55" colspan="3" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="1000" height="50" valign="top"><span class="style36"><img src="image/foot2.jpg" width="1000" height="55"></span></td>
</tr>
</table></td>
</tr>
</table>
</center>
</body>
</html>


รบกวนหน่อยนะค่ะ
ภาพประจำตัวสมาชิก
phpbb
phpBBThailand VIP Members
phpBBThailand VIP Members
โพสต์: 3189
ลงทะเบียนเมื่อ: 19 มิ.ย. 2008, 00:26
ติดต่อ:

Re: รบกวนหน่อยนะค่ะ คืออยากทำค้นหา+แบ่งหน้า แต่ทำไม่ผ่านซักท

โพสต์ โดย phpbb »

ลองดูที่นี่ครับ
http://www.mindphp.com/forums/viewforum.php?f=6" onclick="window.open(this.href);return false;
โหลด phpBB3 ภาษาไทย ทั้งหน้าเว็บ และ admin
รวมพลคนใช้ phpBB3 แนะนำคนอื่นบ้างนะครับ ทุกคำถามจะได้มีคำตอบ แนะนำคนอื่นๆบ้างนะ ช่วยๆกันไป

สมาชิกใหม่ ก่อนถามแนะนำตัว
http://www.phpbbthailand.com/viewforum.php?f=41
กฏการใช้งานบอร์ด
http://www.phpbbthailand.com/viewtopic.php?f=37&t=5940
ตอบกลับโพส

ย้อนกลับไปยัง

ผู้ใช้งานขณะนี้

กำลังดูบอร์ดนี้: 209 และ บุคคลทั่วไป 0 ท่าน