master bagaimana solusinya uda saya coba tetap gagal
<!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=utf-8" />
<title></title>
<meta name="keywords" content="shoes store, free template, ecommerce, online shop, website templates, CSS, HTML" />
<meta name="description" content="Shoes Store is a free ecommerce template provided by templatemo.com" />
<link href="templatemo_style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="nivo-slider.css" type="text/css" media="screen" />
<link rel="stylesheet" type="text/css" href="css/ddsmoothmenu.css" />
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/ddsmoothmenu.js">
/***********************************************
* Smooth Navigational Menu- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>
<script type="text/javascript">
ddsmoothmenu.init({
mainmenuid: "top_nav", //menu DIV id
orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
classname: 'ddsmoothmenu', //class added to menu's outer DIV
//customtheme: ["#1c5a80", "#18374a"],
contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
})
</script>
<style type="text/css">
<!--
.style6 {font-size: 16px}
.style13 {color: #000000}
.style1 { font-family: "Times New Roman", Times, serif;
font-weight: bold;
color: #228B22;
font-size: 20px
}
.style16 {font-weight: bold}
.style30 {color: #FF0000;
font-weight: bold;
font-style: italic;
}
.style21 {font-size: 18px}
.style40 {
font-size: 16px;
font-weight: bold;
color: #2f2f2f;
}
.style41 {font-size: 24px; }
.style42 {color: #FFFFFF}
.style43 {
color: #0000FF;
font-weight: bold;
}
.style47 {color: #000000; font-weight: bold; }
.style48 {font-size: 14px}
.style50 {font-size: 14px; font-weight: bold; }
body {
background-color: #F0F0F0;
}
.style51 {font-size: 16px; color: #000000; }
.style52 {
color: #FF0000;
font-weight: bold;
}
.style53 {color: #FF0000}
-->
</style>
</head>
<body>
<div id="templatemo_body_wrapper">
<div id="templatemo_wrapper">
<div id="templatemo_header">
<div id="site_title"> <h1><a href=""></a></h1>
</div>
<div class="cleaner"> </div>
</div> <!-- END of templatemo_header -->
<div id="templatemo_menubar">
<div id="top_nav" class="ddsmoothmenu">
<ul>
<li></li>
<li>
<!-- END of templatemo_menubar -->
<div id="templatemo_main">
<div id="sidebar" class="float_l"></div>
<div id="content" class="float_r">
<p>
<?php
$host="localhost";
$user="root";
$password="";
$db="db_jualbeli";
$con=mysql_connect("$host","$user","$password");
mysql_select_db($db,$con) or die(mysql_error());
mysql_select_db("pagination");//fungsi pagination
$BatasAwal = 7;
if (!empty($_GET['page'])) {
$hal = $_GET['page'] - 1;
$MulaiAwal = $BatasAwal * $hal;
} else if (!empty($_GET['page']) and $_GET['page'] == 1) {
$MulaiAwal = 0;
} else if (empty($_GET['page'])) {
$MulaiAwal = 0; }
?>
<h2> </h2>
<form action="cari.php" method="post">
<table>
<tr>
<td><span class="style53">Berdasarkan :</span> </td>
<td><select name="berdasarkan">
<option value="--Pilih Berdasarkan--">--Pilih Berdasarkan--</option>
<option value="Pakaian">Pakaian</option>
<option value="Kendaraan">Kendaraan</option>
<option value="Elektronik">Elektronik</option>
<option value="Accesories">Accesories</option>
<option value="Dll">Dll</option>
</select></td>
<td><span class="style53">Cari :</span> </td>
<td><input type="text" name="cari" /></td>
<td><input type="submit" name="submit" value="Filter" /></td>
</tr>
</table>
</form>
<p> </p>
<table width="499" height="142" align="center">
<?php
$query=("select Foto,NamaBarang,Kategori,HargaBarang FROM t_barang order by ID_Barang desc LIMIT $MulaiAwal , $BatasAwal");
$hasil=mysql_query($query);
while($data=mysql_fetch_array($hasil)) {
?>
<tr>
<th width="152" height="79" bordercolor="#000000" bgcolor="#FFFFFF"><span class="style1 style16"><img src="gambarmasuk/<?php echo $data["Foto"] ?>"width="151" height="113" /></span></th>
<td width="244" bgcolor="#FFFFFF"><p><span class="style13"><strong>Nama Barang: </strong></span><span class="style13"><?php echo $data["NamaBarang"]?></span></p>
<p><span class="style13"><strong>Kategori: </strong></span> <span class="style13"><?php echo $data["Kategori"]?></span></p>
<p><span class="style13"><strong>Harga: </strong><span class="style13">Rp.</span><?php echo $data ["HargaBarang"]?> </span></p></td>
<td width="81" bgcolor="#FFFFFF"><p align="center"><a href="viewdetailbarang.php?viewdipilih=<?php echo $data['NamaBarang']?>" class="style30">View Detail </a></p> </td>
</tr>
<tr>
<th height="19" colspan="3" bordercolor="#000000" bgcolor="#FFFFFF"> </th>
</tr>
<?php
}
?>
</table>
<p> </p>
<p>
<?
//navigasi
$cekQuery = mysql_query("select Foto,NamaBarang,Kategori,HargaBarang FROM t_barang ");
$jumlahData = mysql_num_rows($cekQuery);
if ($jumlahData > $BatasAwal) {
echo '<br/><center><div style="font-size:10pt;">Page... : ';
$a = explode(".", $jumlahData / $BatasAwal);
$b = $a[0];
$c = $b + 1;
for ($i = 1; $i <= $c; $i++) {
echo '<a style="text-decoration:none;';
if ($_GET['page'] == $i) {
echo 'color:red';
}
echo '" href="?page=' . $i . '">' . $i . '</a>, ';
}
echo '</div></center>';
}
?>
</p>
<p>
Â
</p>
</p>
<p> </p>
</form>
<div class="cleaner"><a href="tes.php"></a></div>
</div>
<div class="cleaner">
<p><?php
echo "Anda adalah pengunjung ke :";
echo counter();
function counter(){
if (isset($visitor)){
if ($visitor=="visited")
include("counter.txt");
} else {
$file=fopen("counter.txt","r+");
$nilai=fread($file,filesize("counter.txt"));
fclose($file);
$nilai += 1;
$file=fopen("counter.txt","w+");
fputs($file,$nilai);
fclose($file);
include("counter.txt");
}
}
?>
<br></br>
<!-- Histats.com START (standard)-->
<script type="text/javascript">document.write(unescape("%3Cscript src=%27http://s10.histats.com/js15.js%27 type=%27text/javascript%27%3E%3C/script%3E"));</script>
<a href="http://www.histats.com" target="_blank" title="free stats" ><script type="text/javascript" >
try {Histats.start(1,2552568,4,114,103,50,"00011111");
Histats.track_hits();} catch(err){};
</script></a>
<noscript><a href="http://www.histats.com" target="_blank"><img src="http://sstatic1.histats.com/0.gif?2552568&101" alt="free stats" border="0"></a></noscript>
<!-- Histats.com END --><p> </p>
</div>
</div>
<!-- END of templatemo_main -->
<div class="style51" id="templatemo_footer">
<p><strong></a> </strong></p>
</div>
<!-- END of templatemo_footer -->
</div> <!-- END of templatemo_wrapper -->
</div> <!-- END of templatemo_body_wrapper -->
</body>
</html>