Værdien ud af combobox 2 i php
Jeg har lavet nedenstående, men kan ikke få værdien af de valgte elementer ud af combobox 2, hvis jeg vælger dem i combobox 1 og submitter får jeg dem..... HJÆLP! og hvordan får jeg sat værdierne til en variabel altså $tech = værdi1,værdi2,værdi3....<?PHP
require ('includes/config.php');
$result = mysql_query("SELECT * FROM mw_technology")or die("Invalid query: " . mysql_error());
echo "<form action=\"$PHP_SELF\" method=\"post\" enctype=\"multipart/form-data\">";
echo "<table class=\"box\" border=\"0\" align=\"center\" bordercolor=\"#000000\" width=\"300\" height=\"150\" cellpadding=\"0\" cellspacing=\"5\">";
echo "<tr valign=\"middle\">";
echo "<td align=\"center\">";
echo "<select multiple size=\"5\" name=\"Technology[]\" id=\"selTree\">";
while($row = mysql_fetch_array($result)){
$id = $row[0];
$mw_title = $row[1];
$mw_id = "Technology_id_".$id;
echo "<option value=\"$mw_id\">$mw_title</option>";
}
echo "</select>";
echo "</td>";
echo "<td width=\"50\" align=\"center\">";
echo "<input type=\"button\" value=\" >> \" onclick=\"moveSelected( 'selTree', 'selFour' );\"><br>";
echo "<br>";
echo "<input type=\"button\" value=\" << \" onclick=\"moveSelected( 'selFour', 'selTree' );\"><br>";
echo "</td>";
echo "<td width=\"48%\">";
echo "<select size=\"5\" name=\"Technology[]\" id=\"selFour\">";
echo "</select>";
echo "</td>";
echo "</tr>";
echo "<tr><td><input type=\"submit\" value=\"Vælg\"></td></tr>";
echo "</table>";
echo "</form>";
?>
<script language="JavaScript" type="text/javascript">
<!--
var mw_id_ny;
function moveSelected( strSourceID, strTargetID )
{
var objSource = document.getElementById( strSourceID );
var objTarget = document.getElementById( strTargetID );
if( objSource.selectedIndex > -1 )
{
var objOption = objSource.options[ objSource.selectedIndex ];
var objNewOption = new Option( objOption.text, objOption.value )
mw_id_ny = objOption.value;
window.status = mw_id_ny;
objTarget.add( objNewOption );
objSource.remove( objSource.selectedIndex );
}
}
//-->
</script>
<HTML>
<HEAD><TITLE></TITLE></HEAD>
<body>
<?PHP
echo "Indhold";
echo "<br>";
echo $Technology;
echo "<br>";
extract($_GET);
echo "De valgte er:";
print_r($Technology);
?>
</body>
</html>