Is the anyone who can hjelp me with this code. I want to get data from a field of my table and show them in a dropdown menu.
Every data I get become a dropdown of one element. I get want to get a dropdown with alle data from this field.
Here is my code:
<?php
(Database connection)
$result2 = mysql_query("SELECT DISTINCT theme FROM mytable ")
or die(mysql_error());
while($row2 = mysql_fetch_array( $result2 ))
{
?>
<form method="post" action='<?php echo $_SERVER["PHP_SELF"]; ?>'>
<select name='themes'">
<?php
$arr= array($row2['theme']);
foreach($row2 as $value)
{
echo "<option value='$value'><b>". $value."</b> </option><br> ";
}
}
?>
Thanks for help
Temax