I created a dropdown menu and when click on the option on the category in the drop down bar, it can link to my product page, but i failed to linked them, does anyone know what is the problems in my code?
enter code here
$link=mysql_connect("localhost","root","")or die("Can't Connect...");
mysql_select_db("fyp",$link) or die("Can't Connect to Database...");
$query="select * from category ";
$res=mysql_query($query,$link);
while($row=mysql_fetch_assoc($res))
{
echo "<option value='product.php category=".$roww['$cat_id']."'>".$row['cat_nm'];///here is the problem
$qq = "select * from subcat where parent_id=".$row['cat_id'];
$ress = mysql_query($qq,$link) or die("wrong delete subcat query..");
while($roww = mysql_fetch_assoc($ress))
{
echo "<option value='".$roww['subcat_id']."'> ---> ".$roww['subcat_nm'];//here is the problems
}
}
mysql_close($link);
?>