Hi all again !
now i just wanna know this, i have html select which will sort the sub_cat, sub_cat_id, and catagory :
with this way i can insert just the sub_cat, i need to insert the catagory also into another table which include catagory and sub_cat field ?PHP Code:
$sql_cat="select * from subcat";
$result_cat=@mysql_query($sql_cat,$db);
echo "<select name=\"newsub_cat\">";
while($mycat=@mysql_fetch_array($result_cat))
{
$sub_cat=$mycat["sub_cat"];
$sub_cat_id=$mycat["sub_cat_id"];
$catagory=$mycat["catagory"];
echo"<option value=\"$sub_cat\">:: $catagory ::: $sub_cat ::: $sub_cat_id ::</option>";
}
echo"</select>";
?>
i was trying with this :
but didn`t work !PHP Code:$query = mysql_query("Select catagory from subcat where newsub_cat='$sub_cat'",$db);
list($sub_cat_id, $sub_cat, $catagory) = mysql_fetch_row($query);
echo "[$catagory] $newsub_cat";
$newcat=$catagory;



with this code :

Bookmarks