mijn vraag is of ik met php een html dropdown combo box kan uitlezen?
<html>
<form action="index2.php">
<font size=+1>
Attach
<select name=this SIZE=1>
<option value=This>(This)
<option>Ceramic
<option>Fabric
<option>Glass
<option>Leather
<option>Metal
<option>Paper
<option>Plastic
<option>Rubber
<option>Styrofoam
<option>Vinyl
<option>Wood
</select>
to
<select name=that size=1>
<option value=That selected>(That)
<option>Ceramic
<option>Fabric
<option>Glass
<option>Leather
<option>Metal
<option>Paper
<option>Plastic
<option>Rubber
<option>Styrofoam
<option>Vinyl
<option>Wood
</select>
<input type=submit value="Lets Glue!"><br>
</font></form>
<html>
ik heb maar opnieuw gemaakt in php
<?
$values = array('Ceramic', 'Fabric', 'Glass', 'Leather', 'Metal', 'Paper', 'Plastic', 'Rubber', 'Styrofoam', 'Vinyl', 'Wood');
$waarden = array('Ceramic', 'Fabric', 'Glass', 'Leather', 'Metal', 'Paper', 'Plastic', 'Rubber', 'Styrofoam', 'Vinyl', 'Wood');
echo "<form action='index2.php'>";
echo "<font size=+1>";
echo "Attach";
echo "<select name='This'>";
echo "<option value=This>(This)";
foreach
(
$values as $value )
{
echo "<option>$value</option>\n";
}
echo "</select>";
echo " to ";
echo"<select name = 'That'>";
echo "<option value=That>(That)";
foreach ($waarden as $key)
{
echo "<option value=\"$key\">$key</option>\n";
}
echo "</select> ";
echo"<input type=submit value='Lets Glue!'><br>";
echo "</font></form>";
?>
<table width=100% bgcolor=#b5d2eb><tr><td>
<table width=100% bgcolor=#a9c6df><tr><td>
<?
/*
for ($i = 0; $i < count($values) && count($key); $i++){
if ($value == $i && $key == $i){
echo "<b>Ceramic to Ceramic</b>";
break;
}
}
*/
foreach ($waarden as $key){
$index = 0;
$index++;
if ($key == 0 )
echo "<b>Ceramic to Ceramic</b>";
break;
}
if ($key == 1){
echo "<b>Fabric to Ceramic</b>";
break;
}
//<b>Fabric to Glass</b>
?>
ik wil dus dat als je bij box 1 iets kiest en bij box 2 dan moet hij de namen op een nieuwe pagina weergeven..
ik zie nu wel de gegevens in de dropdown box maar hoe kan ik de waardes door geven vb: if box 1 == ceramic && box 2 == Fabric go to page index3.php
iemand een idee/advies
1.982 views