Jump to content

Drop Down


gple

Recommended Posts

how do I pass two values (cat_id and Id1)

 

else if ($action=="sub_cat")

{

$result=mysql_query("SELECT * FROM subcat, type where subcat.cat_id=type.id");

$num=mysql_numrows($result);

 

echo "<form action=add_prod.php?action=change_cat&id=".$id."&var=".$var." method=post enctype=multipart/form-data>";

echo "Category: <select name=price id=price>";

echo "<option selected>--Change--</option>";

 

for($j=0;$j<$num;$j++)

{

$scat=mysql_result($result,$j,"subcat");

$cat=mysql_result($result,$j,"type");

$cat_id=mysql_result($result,$j,"cat_id");

$id1=mysql_result($result,$j,"id");

echo "<option value=".$id1.">".$cat."-".$scat."</option>";

}

 

echo "<input type=submit name=submit value=Change Price></form>";

Link to comment
https://forums.phpfreaks.com/topic/71554-drop-down/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.