dropdown-select-combobox-vullen
Gesponsorde koppelingen
PHP script bestanden
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?
if ($_POST["submit"])
{
$items = explode(",", $_POST["textfield"]);
echo "<form name=\"form\" method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
echo "<input type=\"text\" name=\"textfield\"><br>";
echo "<select name=\"opties\">";
for ($i = 0; $i < count($items); $i++)
{
echo "<option value=\"$items[$i]\">$items[$i]</option>";
}
echo "</select><br>";
echo "<input type=\"submit\" name=\"submit\" value=\"submit\">";
echo "</form>";
}
else
{
echo "<form name=\"form\" method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
echo "<input type=\"text\" name=\"textfield\"><br>";
echo "<input type=\"submit\" name=\"submit\" value=\"submit\">";
echo "</form>";
}
?>
if ($_POST["submit"])
{
$items = explode(",", $_POST["textfield"]);
echo "<form name=\"form\" method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
echo "<input type=\"text\" name=\"textfield\"><br>";
echo "<select name=\"opties\">";
for ($i = 0; $i < count($items); $i++)
{
echo "<option value=\"$items[$i]\">$items[$i]</option>";
}
echo "</select><br>";
echo "<input type=\"submit\" name=\"submit\" value=\"submit\">";
echo "</form>";
}
else
{
echo "<form name=\"form\" method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
echo "<input type=\"text\" name=\"textfield\"><br>";
echo "<input type=\"submit\" name=\"submit\" value=\"submit\">";
echo "</form>";
}
?>