469,942 Members | 2,545 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,942 developers. It's quick & easy.

Tabelle mit Dropdowns

Hallo miteinander, kann mir bitte jemand erklären warum ich mit diesem
code keine dropdowns erzeugen kann:

Gruppe A<br>

<form name="form1">
<table>

<?

mysql_connect("localhost",
"root","");

mysql_select_db("em04");

$abfrage = "SELECT Home, Away FROM gruppea";

$ergebnis = mysql_query($abfrage);

while($row = mysql_fetch_object($ergebnis))
{
echo "<tr><td>",$row->Home,"</td><td>",$row->Away,"</td><td>
<select name="menu1">
<option>test</option>
<option>unnamed1</option>
<option>unnamed2</option>
</select>
</td>
</tr>";

}

?>

</table>
</form>

Besten dank Dominic
Jul 17 '05 #1
1 1286
dominic wrote:
Hallo miteinander, kann mir bitte jemand erklären warum ich mit diesem
code keine dropdowns erzeugen kann:

Gruppe A<br>

<form name="form1">
<table>

<?

mysql_connect("localhost",
"root","");

mysql_select_db("em04");

$abfrage = "SELECT Home, Away FROM gruppea";

$ergebnis = mysql_query($abfrage);

while($row = mysql_fetch_object($ergebnis))
{
echo "<tr><td>",$row->Home,"</td><td>",$row->Away,"</td><td>
<select name="menu1">
<option>test</option>
<option>unnamed1</option>
<option>unnamed2</option>
</select>
</td>
</tr>";

}

?>

</table>
</form>

Besten dank Dominic


You would get more answers if you would write in english.

this should work:

while($row = mysql_fetch_object($ergebnis))
{
echo "<tr><td>".$row['Home']."</td><td>".$row['Away']."</td><td>";
echo "<select name=\"menu1\">\n";
echo "<option>test</option>\n";
echo "<option>unnamed1</option>\n";
echo "<option>unnamed2</option>\n";
echo "</select>\n";
echo "</td>\n";
echo "</tr>\n";
}
?>
Otherwise we need more info.

Greetings, Urs
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Pito81x | last post: by
3 posts views Thread by Damon | last post: by
1 post views Thread by Andy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.