<?php
connection check;
select database;
$sql="select * from category"
mysql_query($sql);
$prod_name=$_POST["prod_name"];
/pls tell me what to pass in cat_id down i have to take the select tag's value property then what should i pass pls help me........./
$cat_id="What to write here...."
sql1="insert into product(prod_name,cat_id) values('".$prod_name."','".$cat_id."');
$r=mysql_query($sql1);
?>
<html>
<form>
<select id=prod name=prod>
<?php
while ($row=mysql_fetch_array($r))
{
echo "<option value=".$row["cat_id"].">$row["cat_name"] </option>";
}
//can you tell me how to add the above value of cat_id and insert to table....
?>
</select>
</form>
</html>