Hi, i just have a small problem thats probabily simple. My table is something like this
|Model|Type|Price|Color
At the moment i have a combo box that will get the different types.....
$login=\"XXX\";
$pass =\"XXX\";
$db=mysql_pconnect(\"localhost\",$login,$pass);
mysql_select_db(\"XXX\",$db);
MySQL_select_db($db_name,$db);
$sql=\"select * ,count(*) from Men_Shoes group by type having count(*)>1\";
$result=MySQL_query($sql,$db) or die(\"Bad query:\".mysql_error());
while($myrow=MySQL_fetch_array($result))
{
$Type=$myrow[\"Type\"];
echo \"$Type\";
}
?>
My problem is that i am useing the $Type values in a java script but i also want them to create an options list for a combo box, but the values go in fine to the java script but only the last value goes into the combo box. Any ideas???
My main aim is to have two combo boxs so that when you pick an option from the first box ,based on that selection the second box will fill with options
Thanks
Dashe
|Model|Type|Price|Color
At the moment i have a combo box that will get the different types.....
$login=\"XXX\";
$pass =\"XXX\";
$db=mysql_pconnect(\"localhost\",$login,$pass);
mysql_select_db(\"XXX\",$db);
MySQL_select_db($db_name,$db);
$sql=\"select * ,count(*) from Men_Shoes group by type having count(*)>1\";
$result=MySQL_query($sql,$db) or die(\"Bad query:\".mysql_error());
while($myrow=MySQL_fetch_array($result))
{
$Type=$myrow[\"Type\"];
echo \"$Type\";
}
?>
My problem is that i am useing the $Type values in a java script but i also want them to create an options list for a combo box, but the values go in fine to the java script but only the last value goes into the combo box. Any ideas???
My main aim is to have two combo boxs so that when you pick an option from the first box ,based on that selection the second box will fill with options
Thanks
Dashe