tengo este codigo que me da opciones de elegir
como paso lo escogido a my base de datos ?
al realizar submit en pagina html me aparece la url
....w w w .mipagina/insertar5.html?firstChoice=2&secondChoice=5&thirdC hoice=5&ciudad=A&firstchoice=B[/url]
intente con get para conseguir los valores de url pero no me funciona
----------------------------insertar5.html-----------------------------------------
<html>
<TITLE>insertar5.html</TITLE>
<title>Listas desplegables dependientes</title>
<BODY style="font-family: Verdana">
<p align="center"><b>Listas desplegables dependientes 5</b></p>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var arrItems1 = new Array();
var arrItemsGrp1 = new Array();
arrItems1[1] = "a1"; arrItemsGrp1[1] = 1;
arrItems1[2] = "a2"; arrItemsGrp1[2] = 1;
arrItems1[3] = "a3"; arrItemsGrp1[3] = 1;
arrItems1[4] = "a4"; arrItemsGrp1[4] = 1;
arrItems1[5] = "b1"; arrItemsGrp1[5] = 2;
arrItems1[6] = "b2"; arrItemsGrp1[6] = 2;
arrItems1[7] = "c1"; arrItemsGrp1[7] = 3;
arrItems1[8] = "c2"; arrItemsGrp1[8] = 3;
var arrItems2 = new Array();
var arrItemsGrp2 = new Array();
arrItems2[1] = "aa1"; arrItemsGrp2[1] = 1;
arrItems2[2] = "aa2"; arrItemsGrp2[2] = 2;
arrItems2[3] = "aa3"; arrItemsGrp2[3] = 3;
arrItems2[4] = "aa4"; arrItemsGrp2[4] = 4;
arrItems2[5] = "bb1.1"; arrItemsGrp2[5] = 5;
arrItems2[6] = "bb1.2"; arrItemsGrp2[6] = 5;
arrItems2[7] = "bb2.1"; arrItemsGrp2[7] = 6;
arrItems2[8] = "cc1.1"; arrItemsGrp2[8] = 7;
arrItems2[9] = "cc1.2"; arrItemsGrp2[9] = 7;
arrItems2[10] = "cc2.1"; arrItemsGrp2[10] = 8;
arrItems2[11] = "cc3.1"; arrItemsGrp2[11] = 9;
function selectChange(control, controlToPopulate, ItemArray, GroupArray)
{
var myEle ;
var x ;
// Empty the second drop down box of any choices
for (var q=controlToPopulate.options.length;q>=0;q--) controlToPopulate.options[q]=null;
if (control.name == "firstChoice") {
// Empty the third drop down box of any choices
for (var q=myChoices.thirdChoice.options.length;q>=0;q--) myChoices.thirdChoice.options[q] = null; }
// ADD Default Choice - in case there are no values
myEle = document.createElement("option") ;
myEle.value = 0 ;
myEle.text = "[Selecciona]" ;
controlToPopulate.add(myEle) ;
// Now loop through the array of individual items
// Any containing the same child id are added to
// the second dropdown box
for ( x = 0 ; x < ItemArray.length ; x++ )
{
if ( GroupArray[x] == control.value )
{
myEle = document.createElement("option") ;
myEle.value = x ;
myEle.text = ItemArray[x] ;
controlToPopulate.add(myEle) ;
}
}
}
// End -->
</script>
</HEAD>
<BODY style="font-family: Verdana">
<form name=myChoices>
<table align="center">
<tr>
<td>
<SELECT id=firstChoice name="firstChoice" onchange="selectChange(this, myChoices.secondChoice,
arrItems1,arrItemsGrp1);">
<option value=1>1</option>
<option value=2>2</option>
<option value=3>3</option>
</select> </br>
</SELECT>
</TD><TD>
<SELECT id=secondChoice name=secondChoice onchange="selectChange(this, myChoices.thirdChoice, arrItems2,
arrItemsGrp2);">
</SELECT>
<SELECT id=thirdChoice name=thirdChoice>
</SELECT>
</TD>
</TR>
<FORM METHOD="POST" ACTION="insertar5.php">
<INPUT TYPE="SUBMIT" value="insertar5">
</TABLE>
</html>
----------------------insertar5.php--------------------------------------------
<?
$con = mysql_connect("**********");
mysql_select_db("*********", $con);
if (!$con) { die('Could not connect: ' . mysql_error()); }
$sql="INSERT INTO orejas (firstchoice,secondChoice,thirdChoice)
VALUES('$_POST[firstchoice]','$_POST[secondChoice]','$_POST[thirdChoice]')";
if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); }echo "1 record added";
mysql_close($con);
?>
--------------------------------------------------------------------------------
help sos , Muchas gracias ,

saludos a todos