Here is my PHP:
<?
//Tour-a-Trak System
//Version 0.1 BETA
//Mark Harris (hadmharris@adelphia.net)
//New Team creation script, writes from file to MySQL dbase
if ((!$Name)||(!$School)||(!$Ident)||(!$NumPlay)||(!$Pool)||(!$Contact))
{
header("Location:NewTeam.htm");
exit;
}
$dbname= "CP";
$table_name= "Teams";
$connection = @mysql_connect("localhost", "simconse","qria12") or
die("Couldn't Connect to Database");
$db = @mysql_select_db($dbname, $connection) or
die("Couldn't select Database");
$sql = "
INSERT INTO $table_name
(ID, Name, School, CODE, Pool, W, L, PF, PA, Contact)
VALUES
(\"\", \"$Name\",\"$School\",\"$Ident\",\"$Pool\",0,0,0,0,\"$Contact\")
";
$result = @mysql_query($sql,$connection)
or die ("Couldn't Execute Query.");
?>
<HTML>
<HEAD>
<TITLE>Adding a New Team</Title>
</HEAD>
<BODY>
<H1> Adding a Record to <? echo "$table_name";?></H1>
<H3>
Name: <? echo "$Name";?><br>
School: <? echo "$School";?><br>
Identifier: <? echo "$Ident";?><br>
Pool: <? echo "$Pool";?><br>
Contact: <? echo "$Contact";?><br>
<form method="POST" action="BuildRoster.php">
<?
for ($x=0; $x<$NumPlay; $x++)
{
echo "<p>First Name: <input type=\"text\" name=\"FName[$x]\" size=\"20\" tabindex=\"1\">
Last Name: <input type=\"text\" name=\"LName[$x]\" size=\"20\" tabindex=\"2\">
Grade: <input type=\"text\" name=\"Grade[$x]\" size=\"5\" tabindex=\"4\">
Jersey Number: <input type=\"text\" name=\"JNum[$x]\" size=\"5\" tabindex=\"5\"></p>";
}
?>
<input type="hidden" name="NumPlay" value=<?echo "$NumPlay";?>>
<input type="hidden" name="CODE" value=<?echo "$Ident";?>>
<p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>
Ok and when I echo I get this:
INSERT INT Players(ID,FName,LName,Team,Grade,Asst,Goals,JNum) VALUES ("","Mark","Harris","JBS",12,0,0,3)
My MySQL Format is as follows:
ID-INT-auto_increment
FName-Varchar
LName-Varchar
Team-Varchar
Grade-Int
Asst-Int
Goals-Int
JNum-Int
I know I am probably making an easy mistake but can't find it.