Ok what i need is the form to have the same fields but with 12 rows and only 1 submit button. I need it to create new rows in the database, so if i put info in all 12 rows it makes 12 rows in the database with the info i put.. This is what the code looks like.
<html><html>
<title> </title>
<body bgcolor="#FFFFFF" text="#000000">
<h1> </h1>
<?php
if (isset($_POST["submit"])) {
$db=mysql_connect("localhost", "dbuser","password");
mysql_select_db("database",$db);
$sql = "INSERT INTO stats (id, pos, name, team, pts) VALUES ('$id','$pos','$name','$team','$pts')";
$result = mysql_query($sql);
echo "There you go.\n";
}
else {
?>
<form method="post" action="<?php echo $PHP_SELF?>">
<table width="90%" border="1">
<tr>
<td width="31%">pos</td>
<td width="37%">name<br> </td>
<td width="24%">team</td>
<td width="8%">pts</td>
</tr>
<tr>
<td><input type="text" name="pos"></td>
<td><input type="text" name="name"></td>
<td><input type="text" name="team"></td>
<td><input name="pts" type="int" id="pts6"></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<p><br>
<br>
<br>
<input type="submit" name="submit" value="Submit">
</p>
</form>
<?PHP
}
?>
</html>