Hej udviklere.
jeg er igang med det her script men kan ikke få det til at virke
jeg får denne fejl
"Column count doesn't match value count at row 1"
på forhånd tak
>>>database
CREATE TABLE `Generationx-members` (
`id` int(11) NOT NULL auto_increment,
`firstname` varchar(25) NOT NULL default '',
`surname` varchar(25) NOT NULL default '',
`born` varchar(10) NOT NULL default '',
`city` varchar(25) NOT NULL default '',
`adress` text NOT NULL,
`country` text NOT NULL,
`email` text NOT NULL,
`msn` text NOT NULL,
`icq` text NOT NULL,
`hjemmeside` text NOT NULL,
`map` varchar(25) NOT NULL default '',
`primary` varchar(25) NOT NULL default '',
`secondary` varchar(25) NOT NULL default '',
`quote` text NOT NULL,
`comment` text NOT NULL,
`rang` varchar(25) NOT NULL default '',
`status` varchar(25) NOT NULL default '',
`aktive` varchar(25) NOT NULL default '',
`username` varchar(25) NOT NULL default '',
`password` varchar(25) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;
>>>>ansog.html
<html>
<head>
<title>Ansøgning</title>
<LINK href='style.css' rel='stylesheet' type='text/css'>
</head>
<body>
<div align="center">
<h2><b>Ansøgning</b></h3>
<form method="post" action="ansog.php">
<table class="table">
<tr>
<td>Firstname</td>
<td width="125"><input type='text' name='Firstname' size='10' maxlength='10'></td>
</tr>
<tr>
<td>Surname</td>
<td width="125"><input type='text' name='Surname' size='10' maxlength='10'></td>
</tr>
<tr>
<td>Born</td>
<td width="125"><input type='text' name='Born' size='10' maxlength='10'></td>
</tr>
<tr>
<td>City</td>
<td width="125"><input type='text' name='City' size='10' maxlength='10'></td>
</tr>
<tr>
<td>Adress</td>
<td><input type='text' name='Adress' size='10' maxlength='10'></td>
</tr>
<tr>
<td>Country</td>
<td><input type='text' name='Country' size='10' maxlength='10'></td>
</tr>
<tr>
<td>E-mail</td>
<td width="125"><input type='text' name='E-mail' size='10' maxlength='10'></td>
</tr>
<tr>
<td>Msn</td>
<td width="125"><input type='text' name='Msn' size='10' maxlength='10'></td>
</tr>
<tr>
<td>Icq</td>
<td width="125"><input type='text' name='Icq' size='10' maxlength='10'></td>
</tr>
<tr>
<td>Hjemmeside</td>
<td width="125"><input type='text' name='Hjemmeside' size='10'></td>
</tr>
<tr>
<td>Maps</td>
<td width="125">
<select name="map" size="1">
<option selected>-</option>
<option>cs_assault</option>
<option>cs_italy</option>
<option>cs_office</option>
<option>cs_militia</option>
<option>cs_siege</option>
<option>cs_747</option>
<option>de_aztec</option>
<option>de_dust</option>
<option>de_dust2</option>
<option>de_inferno</option>
<option>de_prodigy</option>
<option>de_train</option>
<option>de_storm</option>
<option>de_torn</option>
<option>de_vertigo</option>
<option>de_cbble</option>
<option>de_vegas</option>
<option>de_nuke</option>
<option>de_torn</option>
</select>
</td>
</tr>
<tr>
<td>Primary</td>
<td width="125">
<select name="Primary" size="1">
<option selected>-</option>
<option> .45 USP Tactical </option>
<option> Glock 18 </option>
<option> Desert Eagle </option>
<option> Beretta Elite </option>
<option> Sig p228 </option>
<option> Five Seven </option>
</select>
</td>
</tr>
<tr>
<td>Secondary</td>
<td width="125">
<select name="Secondary" size="1">
<option selected>-</option>
<option> M3 Super 90 Combat </option>
<option> xm1014 </option>
<option> MP5 Navy </option>
<option> Steyr TMP </option>
<option> UMP </option>
<option> Mac10 </option>
<option> FN P90 </option>
<option> Colt M4A1 Carbine </option>
<option> Arctic Warfare Magnum </option>
<option> G3/SG-1 Sniper Rifle </option>
<option> SSG552 Commando </option>
<option> Sig 550 </option>
<option> Steyr AUG </option>
<option> AK-47 </option>
<option> Steyr Scout Sniper Rifle </option>
<option> FN M249 PARA </option>
<option> Knife </option>
<option> Flashbang </option>
<option> HE Grenade </option>
<option> Smoke Grenade </option>
</select>
</td>
</tr>
<tr>
<td>Quote</td>
<td width="125"><input type='text' name='Quote' size='10' maxlength='10'></td>
</tr>
<tr>
<td>Comment</td>
<td width="125"><input type='text' name='Comment' size='10' maxlength='10'></td>
</tr>
<tr>
<td align="center" colspan="2" bgcolor="#C0C0C0">Login info</td>
</tr>
<tr>
<td>Username</td>
<td width="125"><input type='text' name='Username' size='10' maxlength='10'></td>
</tr>
<tr>
<td>Password</td>
<td width="125"><input type='password' name='Password1' size='10' maxlength='10'></td>
</tr>
<tr>
<td>Password 2 (retype)</td>
<td width="160"><input type='password' name='Password2' size='10' maxlength='10'></td>
</tr>
<tr>
<td colspan="2" align="center"><input type='submit' name='submit' value='Ansøg'><input type='reset' name='reset' value='Reset'></td>
</tr>
</table>
</form>
</div>
</body>
</html>
>>>>ansog.php
<?php
mysql_connect("XXXXXXX","XXXXXXX","XXXXXX")or die(mysql_error());
mysql_select_db("gb2490") or die(mysql_error());
if($_POST['password1'] == $_POST['password2']) {
mysql_query("INSERT INTO `Generationx-members` (`firstname`, `surname`, `born`, `city`, `adress`, `country`, `email`, `msn`, `icq`, `hjemmeside`, `map`, `primary`, `secondary`, `quote`, `comment`, `rang`, `status`, `aktive`, `username`, `password`) VALUES ('$_POST[Firstname]','$_POST[Surname]','$_POST[Born]','$_POST[City]','$_POST[Adress]','$_POST[Country]','$_POST[Email]','$_POST[Msn]','$_POST[Icq]','$_POST[Hjemmeside]','$_POST[Map]','$_POST[Primary]','$_POST[Quote]','$_POST[Comment]','try','ansoger','inaktiv','$_POST[Username]', 'md5($Password)')")or die(mysql_error());
echo "Din ansøgning er nu afsendt";
}else{
echo "<font color='red'>Password 1 og password 2 er ikke det samme gå tilbage og prøv igen</font>";
}
?>
»»Mark S. Johansen[Redigeret d. 23/02-04 17:39:57 af Mark S. Johansen]