kak mau ty,... pertanyaanya mgkin sudah banyak contoh tp saya mencoba blm pernah bisa . ini krn sy memang belum begitu paham dengan codingnya.
codng yg sudah ada sprti dibwh biar saya bisa mencari berdasarkan harga dan model desainnya gmn ya,.. trimakasaih.

<title>Percetakan ARCADAS</title>
</head>


<body>
<?php
include('koneksi.php');
?>
<div id="menu-atas">
<div id="atas"><div class="logo"><img src="images/logo.png" /></div>
<div class="menu" id="nav">
<ul>
<li><a href="index.php">Home</a></li>
<li><a href="product.php">Produk Kami</a></li>
<li><a href="carapesan.php">Cara Pemesanan</a></li>
<li><a href="about.php">Tentang Kami</a></li>
<li><a href="hubungi.php">Hubungi Kami</a></li>
<li><a href="galeri.php">Galeri</a></li>
</ul>
</div>
<div id="head">
<div id="imgSShow" align="center"><img src="images/header.jpg" alt="large image" name="SLIDESIMG" id="SLIDESIMG" style="opacity: 1;"><script type="text/javascript" src="js/slide-2.js"></script></div>
</div>
<div><img src="images/bawah-head.png" /></div>
</div>
</div>
<div id="isi">
<div id="kiri">
<div id="judul">Katalog Koleksi Produk Kami</div>
<div>Undangan Berdasarkan Harga</div>
<select id="comboharga" name="harga">
<option value="">- Pilih Harga Anda</option>
<option value=""> Harga Rp 1.000 - 5.000</option> //Merk Produk
<option value=""> Harga Rp 5.001 - 10.000</option>
<option value=""> Harga Diatas Rp 10.001</option>
<td> <input type="SUBMIT" name="SUBMIT" id="SUBMIT" value="search" > </td>
</select>
<tr>
<select id="comboKategori" name="comboKategori">
<option value="">- Pilih Desain Undangan -</option> //produk
<option value="1">U-Biasa</option>
<option value="2">U-Tebal</option>
<option value="3">U-Foto</option>
<option value="4">U-Kipas</option>
<option value="5">U-Gulung</option>
<option value="6">U-Tas</option>
<option value="7">U-Unik</option>
<option value="8">U-Pita</option>
<td> <input type="SUBMIT" name="SUBMIT" id="SUBMIT" value="search" > </td>
</select> </tr>
<?php

// menampilkan data

if ((isset($_POST)) AND ($_POST <> "")) {
$search = $_POST;
$sql = mysql_query("SELECT * FROM barang WHERE nama_barang LIKE '%$search%' ") or die(mysql_error());
//menampilkan jumlah hasil pencarian
$jumlah = mysql_num_rows($sql);
if ($jumlah > 0) {
echo '<p>Ada '.$jumlah.' data yang sesuai.</p>';

while ($res=mysql_fetch_array($sql)) {
$nomor++; echo $nomor.'. ';
echo $res[nama_barang].'<br>';
}
}
else {
// menampilkan pesan zero data
echo 'Maaf, hasil pencarian tidak ditemukan.';
}
}
?>

<?php

$batas=6;
$paging=$_GET;
if(empty($paging))
{
$posisi=0;
$paging=1;
}

else{
$posisi=($paging-1) * $batas;
}
$q=mysql_query("select * from barang order by id_barang desc limit $posisi,$batas");
while($r=mysql_fetch_array($q))
{
echo"<div id='sub-barang'><div>$r[nama_barang]</div><img src='barang/$r[gambar]' width='150' height='120' class='gambar'>
<div><i>Harga Rp.$r[harga]</i>
</br>
<a href='pesan.php?id_barang=$r[id_barang]'><div class='submitButton3'>Order Item</div></a>
<a href='detail.php?id_barang=$r[id_barang]' onclick=\"return hs.htmlExpand(this, { objectType: 'iframe' } )\">
<div class='submitButton3'>Review Item</div></a>
</div></div>";
}

//penomoran
echo "<tr><td colspan='2' valign='top' align='center'>";
$query2=mysql_query("select * from barang");
$jumlah_data=mysql_num_rows($query2);
$jumlah_halaman=ceil($jumlah_data/$batas);
echo"<div id='paging'>";
if (1 != $paging){//tanda != berarti perintah akan dijalankan jika $paging tidak sama dengan 1, copyright all teknik paging by go_blind_hacker, powered by V-boys_studio
$back=$paging-1;
echo "<div id='kotak-paging'><a href='product.php?paging=$back'><b>Back</b></a></div>";
}
else{
echo"<div id='kotak-paging'>Back</div>";
}

if ($paging != $jumlah_halaman){
$next=$paging+1;
echo" <div id='kotak-paging'><a href='product.php?paging=$next'> <b>Next</b></a></div>";
}
else
{
echo "<div id='kotak-paging'>Next</div>";
}
echo"</div>";
?>

</div>
<div id="kanan">

<?php
if(empty($_SESSION[namamember])){
?>
<div id="judul">Member Log In</div>
<div id="widget">
<form method="post" action="log-member.php">
<table>
<tr><td>Username</td><td>:</td><td><input type="text" name="user" class="input" size="25"/></td></tr>
<tr><td>Password</td><td>:</td><td><input type="password" name="pass" class="input" size="25"/></td></tr>
<tr><td></td><td></td><td><input type="submit" value="Masuk" class="submitButton" /> <input type="reset" value="Hapus" class="submitButton" /></td></tr>
</table>
</form>
<a href="registrasi.php"><div class="submitButton2">Gak Punya Akun? Daftar Akun Baru</div></a>
</div>
<?php
}
else{
?>
<div id="judul">Selamat Datang</div>
<div id="widget">
<?php
$d=date('d');
$m=date('m');
$y=date('Y');
?>
<img src="images/user-icon.jpg" class="gambar2" />
Halo "<b><?php echo"$_SESSION[nama]"; ?></b>"<br />
Login Tanggal : <?php echo "$d-$m-$y"; ?><br /><br /><br /><br /><br />
<a href="logout.php"><div class="submitButton2">Keluar</div></a>
</div>
<?php
}
?>

<div id="judul">Toko Offline Kami</div>
<div id="widget">
<li class="li-class">Yogyakarta</li>
<li class="li-class-no">Jl. Parangtritis no.684
Kec. Matrijeron, MJ III</li>
<a href="hubungi.php"><div class="submitButton2">Ada Masalah? Hubungi Kami aja..!!</div></a>
</div>

<div id="judul">Temukan Kami di :</div>
<div id="widget">
<img src="images/facebook.gif" class="image" width="30"/><strong>Facebook</strong><br/> <a href="https://www.facebook.com/ganda.siburukrupa">Percetakan Arcdas </a><br /><br />
</div>

<div id="judul">Komentar anda</div>
<div id="widget">
<div style="background-color: #FFECEC; border: 0px solid 00000; color: black; font-family: Courier New;
font-size: 12px; height: 100px; overflow-y:scroll;overflow-x:hidden; padding: 0px; text-align: left; width: 240px;">
<li>
<a href='hubungi.php'> <img src="images/mail.jpg" class="image" width="15"/>Mau komentar..?Klik saja</a>
</li>
<br/>
Silahkan login untuk menjawab!
0
Loading...
Muslichatun Moza · Jul 10, 2014 · 0 Suka · 0 Tidak Suka
kak, codingy udh sy coba.
tidak ada yg error cm harga dan gambar hasil comboboxnya tdk muncul sedangkan gambar semua produk dri coding paging masih ada.
kalau seumpama coding cari combobox digabung dgn coding paging kk bisa bantu lagi ?
<?php
<form action="" method="get">
<div>Undangan Berdasarkan Harga</div>
    <select id="comboharga" name="harga">
    <option value="">- Pilih Harga Anda</option>
    <option value="1000-5000"> Harga Rp 1.000 - 5.000</option>
    <option value="5001-10000"> Harga Rp 5.001 - 10.000</option>
    <option value="10001-"> Harga Diatas Rp 10.001</option>
    </select>
     
    <select id="comboKategori" name="nama_barang">
    <option value="">- Pilih Desain Undangan -</option>
    <option value="1">U-Biasa</option>
    <option value="2">U-Tebal</option>
    <option value="3">U-Foto</option>
    <option value="4">U-Kipas</option>
    <option value="5">U-Gulung</option>
    <option value="6">U-Tas</option>
    <option value="7">U-Unik</option>
    <option value="8">U-Pita</option>
    </select>
    </form>
$batas=6;
$paging=$_GET['paging'];
if(empty($paging))
	{
	$posisi=0;
	$paging=1;
	}

else{
	$posisi=($paging-1) * $batas;
	}
$q=mysql_query("select * from barang order by id_barang desc limit $posisi,$batas");
while($r=mysql_fetch_array($q))
{
echo"<div id='sub-barang'><div>$r[nama_barang]</div><img src='barang/$r[gambar]' width='150' height='120' class='gambar'>
<div><i>Harga Rp.$r[harga]</i>
</br>
<a href='pesan.php?id_barang=$r[id_barang]'><div  class='submitButton3'>Order Item</div></a>
<a href='detail.php?id_barang=$r[id_barang]' onclick=\"return hs.htmlExpand(this, { objectType: 'iframe' } )\">
<div  class='submitButton3'>Review Item</div></a>
</div></div>";
}

//penomoran
echo "<tr><td colspan='2' valign='top' align='center'>";
$query2=mysql_query("select * from barang");
$jumlah_data=mysql_num_rows($query2);
$jumlah_halaman=ceil($jumlah_data/$batas);
echo"<div id='paging'>";
if (1 != $paging){//tanda != berarti perintah akan dijalankan jika $paging tidak sama dengan 1, copyright all teknik paging by go_blind_hacker, powered by V-boys_studio
	$back=$paging-1;
	echo "<div id='kotak-paging'><a href='product.php?paging=$back'><b>Back</b></a></div>";
	}
	else{
	echo"<div id='kotak-paging'>Back</div>";
	}
	
if ($paging != $jumlah_halaman){
	$next=$paging+1;
	echo" <div id='kotak-paging'><a href='product.php?paging=$next'>  <b>Next</b></a></div>";
	}
	else
	{
	echo "<div id='kotak-paging'>Next</div>";
	}
echo"</div>";
?>
0
Loading...
Ellyx Christian · Jul 11, 2014 · 0 Suka · 0 Tidak Suka
<form action="" method="get">
<div>Undangan Berdasarkan Harga</div>
<select id="comboharga" name="harga">
<option value="">- Pilih Harga Anda</option>
<option value="1000-5000"> Harga Rp 1.000 - 5.000</option>
<option value="5001-10000"> Harga Rp 5.001 - 10.000</option>
<option value="10001-"> Harga Diatas Rp 10.001</option>
</select>

<select id="comboKategori" name="nama_barang">
<option value="">- Pilih Desain Undangan -</option>
<option value="1">U-Biasa</option>
<option value="2">U-Tebal</option>
<option value="3">U-Foto</option>
<option value="4">U-Kipas</option>
<option value="5">U-Gulung</option>
<option value="6">U-Tas</option>
<option value="7">U-Unik</option>
<option value="8">U-Pita</option>
</select>
</form>
<?php
$sql = "select * from barang";
if ($_GET){
	$sql .= " where 1=1";
	if ($_GET['harga']) {
		$harga = explode('-', $_GET['harga']);
		if ($harga[0]) {
			$sql .= " and harga >='".$harga[0]."'";
		}
		if ($harga[1]) {
			$sql .= " and harga <='".$harga[0]."'";
		}
	}
 
	// lakukan hal yang sama dengan katergory
	// misal
	// if ($_GET['comboKategori']) {
	// $sql .= " and kategory='".$_GET['comboKategori']."'";
	// }
}
$batas=6;
$paging=$_GET['paging'];
if(empty($paging))
{
$posisi=0;
$paging=1;
}

else{
$posisi=($paging-1) * $batas;
}
$q=mysql_query($sql." order by id_barang desc limit $posisi,$batas");
while($r=mysql_fetch_array($q))
{
echo"<div id='sub-barang'><div>$r[nama_barang]</div><img src='barang/$r[gambar]' width='150' height='120' class='gambar'>
<div><i>Harga Rp.$r[harga]</i>
</br>
<a href='pesan.php?id_barang=$r[id_barang]'><div class='submitButton3'>Order Item</div></a>
<a href='detail.php?id_barang=$r[id_barang]' onclick=\"return hs.htmlExpand(this, { objectType: 'iframe' } )\">
<div class='submitButton3'>Review Item</div></a>
</div></div>";
}

//penomoran
echo "<tr><td colspan='2' valign='top' align='center'>";
$query2=mysql_query($sql);
$jumlah_data=mysql_num_rows($query2);
$jumlah_halaman=ceil($jumlah_data/$batas);
echo"<div id='paging'>";
if (1 != $paging){//tanda != berarti perintah akan dijalankan jika $paging tidak sama dengan 1, copyright all teknik paging by go_blind_hacker, powered by V-boys_studio
$back=$paging-1;
echo "<div id='kotak-paging'><a href='product.php?paging=$back'><b>Back</b></a></div>";
}
else{
echo"<div id='kotak-paging'>Back</div>";
}

if ($paging != $jumlah_halaman){
$next=$paging+1;
echo" <div id='kotak-paging'><a href='product.php?paging=$next'> <b>Next</b></a></div>";
}
else
{
echo "<div id='kotak-paging'>Next</div>";
}
echo"</div>";
?>
0
Loading...
Muslichatun Moza · Aug 12, 2014 · 0 Suka · 0 Tidak Suka
Ternayata saya blum bisa jg kak..
belum mau tampil sesuai pencaian.
<?php
    $sql = "select * from barang where harga or nama_barang LIKE '%$cari%'";
    if ($_GET){
    $sql .= " where 1=1";
    if ($_GET['harga']) {
    $harga = explode('-', $_GET['harga']);
    if ($harga[0]) {
    $sql .= " and harga >='".$harga[0]."'";
    }
    if ($harga[1]) {
    $sql .= " and harga <='".$harga[0]."'";
    }
    }
    else
    //lakukan hal yang sama dengan katergory
    // misal
    if ($_GET['nama_barang']) {
    $nama_barang= explode('-', $_GET['nama_barang']);
    if ($nama_barang[0]){
	$sql .= " nama_barang ".$nama_barang[0]."'";
    }
    if ($nama_barang[1]) {
    $sql .= " and nama_barang ".$nama_barang[0]."'";
    }
	}
    }
     
   
?>	

<?php

$batas=6;
$paging=$_GET['paging'];
if(empty($paging))
	{
	$posisi=0;
	$paging=1;
	}

else{
	$posisi=($paging-1) * $batas;
	}
$q=mysql_query("select * from barang order by id_barang desc limit $posisi,$batas");
while($r=mysql_fetch_array($q))
{
echo"<div id='sub-barang'><div>$r[nama_barang]</div><img src='barang/$r[gambar]' width='150' height='120' class='gambar'>
<div><i>Harga Rp.$r[harga]</i>
</br>
<a href='pesan.php?id_barang=$r[id_barang]'><div  class='submitButton3'>Order Item</div></a>
<a href='detail.php?id_barang=$r[id_barang]' onclick=\"return hs.htmlExpand(this, { objectType: 'iframe' } )\">
<div  class='submitButton3'>Review Item</div></a>
</div></div>";
}

//penomoran
echo "<tr><td colspan='2' valign='top' align='center'>";
$query2=mysql_query("select * from barang");
$jumlah_data=mysql_num_rows($query2);
$jumlah_halaman=ceil($jumlah_data/$batas);
echo"<div id='paging'>";
if (1 != $paging){//tanda != berarti perintah akan dijalankan jika $paging tidak sama dengan 1, copyright all teknik paging by go_blind_hacker, powered by V-boys_studio
	$back=$paging-1;
	echo "<div id='kotak-paging'><a href='product.php?paging=$back'><b>Back</b></a></div>";
	}
	else{
	echo"<div id='kotak-paging'>Back</div>";
	}
	
if ($paging != $jumlah_halaman){
	$next=$paging+1;
	echo" <div id='kotak-paging'><a href='product.php?paging=$next'>  <b>Next</b></a></div>";
	}
	else
	{
	echo "<div id='kotak-paging'>Next</div>";
	}
echo"</div>";
?>