yes i tried replacing $ with RS
It displays while page load
but on changing the slider values
it executes the else part
if($_POST)
{
mysqli_real_escape_string($connection,$_POST['amount']);
$values = str_replace(' ','',$_POST['amount']);
$values = str_replace('$','',$values);
$values = explode('-',$values);
$min = $values[0];
$max = $values[1];
$res = mysqli_query($connection,'select `id`,`product_name`, `details`,`price` from products where `price` BETWEEN "'.$min.'" AND "'.$max.'"');
$count = mysqli_num_rows($res);
$dynamicList = "";
//$sql = mysql_query("SELECT * FROM products ORDER BY date_added DESC LIMIT 6");
//$productCount = mysql_num_rows($sql); // count the output amount
if ($count > 0)
{
while($row = mysqli_fetch_array($res))
{
$id = $row["id"];
$product_name = $row["product_name"];
$price = $row["price"];
//$date_added = strftime("%b %d, %Y", strtotime($row["date_added"]));
$dynamicList .= '<table width="100%" border="0" cellspacing="0" cellpadding="6">
<tr>
<td width="17%" valign="top">
<a href="product.php?id=' . $id . '">
<img style="border:#666 1px solid;" src="inventory_images/' . $id . '.jpg" alt="' . $product_name . '" width="77" height="102" border="1" /></a></td>
<td width="83%" valign="top">' . $product_name . '<br /> RS. ' . $price . '<br />
<a href="product.php?id=' . $id . '">View Product Details</a></td>
</tr>
</table>';
}
}
else
{
$dynamicList = "<b><i>We have Currently no products in this range. Sorry Check again later ! </i></b>";
}
}
this is wat i ve used