Data bliver ikke sendt til databasen?
Jeg har en formel her der ikke sender data til databasen, hvad kan der være galt?<?php
session_start();
if (isset($_SESSION['aid'])) {
if (isset($_POST['ny'])) {
// Gem til database
include("config.php");
$result = mysql_query("SELECT * FROM udfordre") or die(mysql_error());
while ($data = mysql_fetch_array($result))
$clantag = htmlentities($_POST['clantag']);
$hp = htmlentities($_POST['hp']);
$lineup = htmlentities($_POST['lineup']);
$map1 = htmlentities($_POST['map1']);
$map2 = htmlentities($_POST['map2']);
$dato = htmlentities($_POST['dato']);
$chan = htmlentities($_POST['chan']);
$type = htmlentities($_POST['type']);
$sql = "INSERT INTO `udfordre` (`id`, `lineup`, `clantag`, `hp`, `map1`, `map2`, `dato`, `chan`, `type`) VALUES ('$_POST[id]', '$clantag', '$hp', '$lineup' '$map1', '$map2', '$dato', '$chan', '$type')";
mysql_query($sql) or die(mysql_error());
}
}
include("tjek.htm");
php?>
<html>
<head>
<title>Udfordre os</title>
</head>
<body>
<form action="udfordring.php" method="post" enctype="multipart/form-data">
Clantag:<br>
<input name="clantag" type="text" id="clantag" style="background-color: Black; color: White; font-family: Tahoma; font-size: 10;"><br>
E-Mail:<br>
<input name="email" type="text" id="email" style="background-color: Black; color: White; font-family: Tahoma; font-size: 10;"><br>
Hjemmeside:<br>
<input name="hp" type="text" id="hp" size="20" style="background-color: Black; color: White; font-family: Tahoma; font-size: 10;"><br>
<select size="1" name="map1" style="background-color: Black; color: White; font-family: Tahoma; font-size: 10;">
<option>Map 1</option>
<option>de_dust2</option>
<option>de_inferno</option>
<option>de_clan1_mill</option>
<option>de_nuke</option>
<option>de_train</option>
<option>de_cbble</option>
</select><br>
<select size="1" name="map2" style="background-color: Black; color: White; font-family: Tahoma; font-size: 10;">
<option>Map 2</option>
<option>de_dust2</option>
<option>de_inferno</option>
<option>de_clan1_mill</option>
<option>de_nuke</option>
<option>de_train</option>
<option>de_cbble</option>
</select><br>
Dato:<br>
<input name="dato" type="text" size="20" maxlength="10" style="background-color: Black; color: White; font-family: Tahoma; font-size: 10;">
<br>
Line-Up:<br>
<input name="lineup" type="text" size="20" maxlength="10" style="background-color: Black; color: White; font-family: Tahoma; font-size: 10;"><br>
Irc channel:<br>
<input name="chan" type="text" size="20" maxlength="10" style="background-color: Black; color: White; font-family: Tahoma; font-size: 10;"><br>
<select size="1" name="type" style="background-color: Black; color: White; font-family: Tahoma; font-size: 10;">
<option>type</option>
<option>PCW(training)</option>
<option>CW(Clan War)</option>
<option>Fw(friendly)</option>
</select><br>
<input name="ny" type="submit" value="send" style="background-color: Black; color: White; font-family: Tahoma; font-size: 10;"></form>
</body>
</html>