Indsæt i db! ID problem.
Halløjsa, Jeg har et problem... jeg har dette script som sætter noget info ind i en database... og nu er det så sådan at min auto_increment hedder userid og ikk ID som normalt... :) det så her mit script fejler grumt...:KODE:
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<style type="text/css">
body,input {
font: 10px verdana,arial,sans-serif;
}
.frmobj {
padding-top: 3px;
float: left;
width: 120px;
}
</style>
</head>
<body>
<form method="post" action="<?php echo $_SERVER['PHP_SELF'];?>">
<table width="200" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><span class="style2">Nick</span></td>
<td>:</td>
<td>
<input name="navn" type="text"></td>
</tr>
<tr>
<td><span class="style2">Password</span></td>
<td>:</td>
<td><input name="password" type="text"></td>
</tr>
<tr>
<td><span class="style2">Position</span></td>
<td>:</td>
<td><input name="position" type="text"></td>
</tr>
<tr>
<td><span class="style2">Joined</span></td>
<td>:</td>
<td><input name="joined" type="text"></td>
</tr>
<tr>
<td><span class="style2">Status</span></td>
<td>:</td>
<td><input name="status" type="text"></td>
</tr>
<tr>
<td><span class="style2">Former</span></td>
<td>:</td>
<td><input name="former" type="text"></td>
</tr>
<tr>
<td><span class="style2">Real name </span></td>
<td>:</td>
<td><input name="name" type="text"></td>
</tr>
<tr>
<td><span class="style2">Location</span></td>
<td>:</td>
<td><input name="location" type="text"></td>
</tr>
<tr>
<td><span class="style2">Age</span></td>
<td>:</td>
<td><input name="age" type="text"></td>
</tr>
<tr>
<td><span class="style2">Mail</span></td>
<td>:</td>
<td><input name="mail" type="text"></td>
</tr>
<tr>
<td><span class="style2">Icq</span></td>
<td>:</td>
<td><input name="icq" type="text"></td>
</tr>
<tr>
<td><span class="style2">Cpu</span></td>
<td>:</td>
<td><input name="cpu" type="text"></td>
</tr>
<tr>
<td><span class="style2">Memory</span></td>
<td>:</td>
<td><input name="memory" type="text"></td>
</tr>
<tr>
<td><span class="style2">Grafix card</span></td>
<td>:</td>
<td><input name="gfx" type="text"></td>
</tr>
<tr>
<td><span class="style2">Mouse</span></td>
<td>:</td>
<td><input name="mouse" type="text"></td>
</tr>
<tr>
<td><span class="style2">Mouse pad</span></td>
<td>:</td>
<td><input name="pad" type="text"></td>
</tr>
<tr>
<td><span class="style2">Resolution</span></td>
<td>:</td>
<td><input name="resolution" type="text"></td>
</tr>
<tr>
<td><span class="style2">Connection</span></td>
<td>:</td>
<td><input name="connection" type="text"></td>
</tr>
<tr>
<td><span class="style2">Config</span></td>
<td>:</td>
<td><input name="cfg" type="text"></td>
</tr>
<tr>
<td><span class="style2">Quote</span></td>
<td>:</td>
<td><input name="quote" type="text"></td>
</tr>
<tr>
<td><span class="style2">Pic</span></td>
<td>:</td>
<td><input name="pic" type="text"></td>
</tr>
</table>
<br>
<br>
<input type="hidden" name="op" value="ds">
<input type="submit" name="send" value="Add member">
</form>
<?php
if (isset($send)) {
$sql = "insert into brugere(navn,password,position,joined,status,former,name,location,age,mail,icq,cpu,memory,gfx,mouse,pad,resolution,connection,cfg,quote,pic) values('$navn',MD5('$password'),'$position','$joined','$status','$former','$name','$location','$age','$mail','$icq','$cpu','$memory','$gfx','$mouse','$pad','$resolution','$connection','$cfg','$quote','$pic')";
@mysql_query($sql) or die ("Der opstod en fejl - member kunne ikke tilføjes."); }
?>
</body>
</html>
:KODE SLUT:
Og Jeg ved så selvfølgelig godt se den ikk har noget at gå udfra, det er det jer eksperter lige ska tilføje :P