select option mysql hjælp
Hej, FolkensEr i gang med at lave en brackets,
men der er kommet et problem med "INSERT INTO".
//brackets.php
<form action="submit.php" method="POST">
<select name="team1">
<option selected="selected">Team 1</option>
<?php
$db = mysql_connect("mydb5.surftown.dk", "vuksite_data", "monday");
mysql_select_db("vuksite_data", $db);
$foresp = mysql_query ("SELECT * FROM ass_team WHERE cup_godkendt = 'yes' ORDER BY clan_navn ");
while ($data = mysql_fetch_array($foresp)){
echo "<option name='team1'>" . $data["clan_navn"] . "</option>";
}
?>
</select>
vs. <select name="team2">
<option selected="selected">Team 2</option>
<?php
$foresp = mysql_query ("SELECT * FROM ass_team WHERE cup_godkendt = 'yes' ORDER BY clan_navn ");
while ($data = mysql_fetch_array($foresp)){
echo "<option name='team2'>" . $data["clan_navn"] . "</option>";
}
?>
</select>
</form>
<!--- PS. har kun skrev de 2 første select box'e ned har os ---!>
//submit.php
<?
$team1 = $_POST["team1"];
$team2 = $_POST["team2"];
$team3 = $_POST["team3"];
$team4 = $_POST["team4"];
$team5 = $_POST["team5"];
$team6 = $_POST["team6"];
//mysql info
mysql_connect("mydb5.surftown.dk", "vuksite_data", "monday");
mysql_select_db("vuksite_data");
mysql_query("INSERT INTO brackets (id, team1, team2, team3, team4, team5, team6) VALUES ('', '$team1', '$team2', '$team3', '$team4', '$team5', '$team6')");
?>
Håber i kan se problemet, takker på forhånd.