<?php
include("connect.php");
$cat_id=$_REQUEST['cat_id'];
$search_key=$_REQUEST['search_key'];
if($search_key != "")
{
$sql=mysql_query("SELECT * FROM tbl_products WHERE title LIKE '%$search_key%' OR short_descrp LIKE '%$search_key%' OR description LIKE '%$search_key%'")or die(mysql_error());
$count=mysql_num_rows($sql);
if($count > 0)
{
while($row_city=mysql_fetch_array($sql))
{
//echo $row_city['title']."<br>";
//echo $row_city['short_descrp'];
?>
<div class="section group">
<div class="city">
<div style="float:left">
<img src="images/member_posts/<?=$row_city['image1'];?>" title="<?=$row_city['title'];?>" height="100" width="160" >
</div>
<div style="float:none">
<p><?=$row_city['title'];?></p>
<h1>Rs : <?=$row_city['amount']?></h1>
<p>Negotiable Status : <?=$row_city['negotiable'];?></p>
<a href="product.php?pro_id=<?=$row_city['id']?>&& cat_id=<?=$cat_id?>" class="link">Read More</a>
</div>
</div>
</div>
<?php
}
}
else
?>
<?php
{
echo '<script type="text/javascript">alert("Keyword Does not match");window.location.href="category.php";</script>';
}
}
else
{
?>
<?php
echo '<script type="text/javascript">alert("Please Type to Search");window.location.href="category.php";</script>';
}
mysql_close($con);
?>
in this code, for me, alert box is not working????? what is the problem??? in my code...
ONclick only working , If i give on submit instead onsubmit its not working....
Tell me where I have error, and What I have to change?