แก้ไข ชื่อฐานข้อมูล , จำนวนColumn , จำนวน data/page ได้ที่ ตัวแปรด้านบนครับ PHP นะครับ
Copy มาจาก Code เวบ E-commerce ตัวเอง ค่่าบางอย่างไปแก้เอานะครับ

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd 
">
<html xmlns="
http://www.w3.org/1999/xhtml 
">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<title>Untitled Document</title>
</head>
<body>
<?
$tblname = "xxxx";
$column = "xxx"; // column
$perpage = "xxx"; // data per page
?>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"><?
//$objConnect = mysql_connect("localhost","root","rootpass") or die(mysql_error());
//$objDB = mysql_select_db("golf_taylormade");
$strSQL = "SELECT * FROM $tblname where p_showIndex='1'";
$objQuery = mysql_query($strSQL);
$Num_Rows = mysql_num_rows($objQuery);
$Per_Page = $perpage; // 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;
}
$strSQL .=" order by ID DESC LIMIT $Page_Start , $Per_Page";
$objQuery = mysql_query($strSQL);
echo"<table width=100% border=0 align=center cellpadding=0 cellspacing=0>
<tr>
<td valign=top><table width=100% border=0 align=center cellpadding=2 cellspacing=2 class=line>
<tr>";
// echo"<table width=\"620\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\"><tr>";
$intRows = 0;
while($objResult = mysql_fetch_array($objQuery))
{
echo "<td>";
$intRows++;
?>
<center>
<table width="100%" border="0" cellpadding="1" cellspacing="0">
<tr>
<td valign="bottom" ><table id="Table_01" width="158" height="302" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><img src="images/box_product_01.gif" width="8" height="12" alt=""></td>
<td background="images/box_product_02.gif"><img src="images/box_product_02.gif" width="143" height="12" alt=""></td>
<td><img src="images/box_product_03.gif" width="7" height="12" alt=""></td>
</tr>
<tr>
<td><img src="images/box_product_04.gif" width="8" height="278" alt=""></td>
<td><table width="100%" height="278" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="139"><div align="center">
<?
if($objResult['p_pic1']=='')
{
echo "<a href=main_mart1.php?mpage=show_product&proNo=$objResult[ID] target=_blank><img src=$pic_httppic_product/default.jpg
width=120 height=150 border=0></a>";
}
else
{
echo "<a href=main_mart1.php?mpage=show_product&proNo=$objResult[ID] target=_blank><img src=$pic_http$objResult[p_pic1] width=150 height=150 border=0></a>";
//echo "admin/$objResult[p_pic]";
}
?>
</div></td>
</tr>
<tr>
<td valign="bottom"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td width="40" valign="top" class="txtjzday_12"><div align="right">รหัส : </div></td>
<td valign="top" class="txtBpink"><div align="left">
<?=$objResult['p_id']?>
</div></td>
</tr>
<tr>
<td width="40" valign="top" class="txtjzday_12"><div align="right">สินค้า : </div></td>
<td width="70%" valign="top" class="txtjames-green-j"><div align="left">
<?=$objResult['p_name']; ?>
</div></td>
</tr>
<tr>
<td height="27" colspan="2" class="txtBlack_mil"><div align="center">
<?
if(((isset($_SESSION['mID'] )) || (isset($_SESSION['musrname'])) && ($_SESSION['musrname'] <> 'admin')))
{
?>
<a href="main_mart1.php?mpage=step1&proNo=<?=$objResult['ID']?>"><img src="picweb/click_order.gif" width="101" height="39" border="0"></a>
<?
}
else
{
?>
<a href="#" onclick="alert('กรุณา Login ก่อนจ้า..ถ้ายังไม่มี user,password Click! สมัครสมาชิกได้เลยจ้า..');return true;"><img src="picweb/click_order.gif" width="101" height="39" border="0"></a>
<?
}
?>
</div></td>
</tr>
<tr>
<td width="40" valign="top" class="txtnevy_12"><div align="right" class="txtjzday_12">ราคา : </div></td>
<td valign="top" class="txtjames-green-j"><div align="left" class="txtGreen">
<?
if(($objResult['p_priceOld']=='') || ($objResult['p_priceOld']=='0') || ($objResult['p_priceOld']=='-'))
{
echo $objResult['p_price']." บาท";
}
else
{
echo "<span class=txtmilBlack>ปกติ</span> <s>$objResult[p_priceOld]</s>"." <span class=txtmilBlack>ลดเหลือ</span> <span class=txtRed1>".$objResult['p_price']." บ.<span>";
}
?>
</div></td>
</tr>
</table></td>
</tr>
</table></td>
<td><img src="images/box_product_06.gif" width="7" height="278" alt=""></td>
</tr>
<tr>
<td><img src="images/box_product_07.gif" width="8" height="12" alt=""></td>
<td background="images/box_product_08.gif"><img src="images/box_product_08.gif" width="143" height="12" alt=""></td>
<td><img src="images/box_product_09.gif" width="7" height="12" alt=""></td>
</tr>
</table></td>
</tr>
</table>
</center>
<?
echo"</td>";
if(($intRows)%$column==0)
{
echo"</tr>";
}
}
echo" </tr>
</table></td>
</tr>
</table>";
$page = ceil($Num_Rows/$Per_Page); // เอา record ทั้งหมด หารด้วย จำนวนที่จะแสดงของแต่ละหน้า
/* เอาผลหาร มาวน เป็นตัวเลข เรียงกัน เช่น สมมุติว่าหารได้ 3 เอามาวลก็จะได้ 1 2 3 */
for($i=1;$i<=$page;$i++){
if($_GET['page']==$i){ //ถ้าตัวแปล page ตรง กับ เลขที่วนได้
echo "[<a href='index.php?Page_Start=".$Per_Page*($i-1)."&Page=$i'><B>$i</B></A>]"; //ลิ้งค์ แบ่งหน้า เงื่อนไขที่ 1
}else{
echo "[<a href='index.php?Page_Start=".$Per_Page*($i-1)."&Page=$i'>$i</A>]"; //ลิ้งค์ แบ่งหน้า เงื่อนไขที่ 2
}
}
echo "<hr />";
?></td>
</tr>
</table>
</body>
</html>