<div id="mid_section"> <div class="mid_section_inner"> <div class="mid_box"> <div class="mid_box_title"></div> </div> <div class="mid_box"> <div class="mid_box_title">Want to make a team?</div> <form> <label></label> <br/> <br/> <label>What do you want your Team To Be Called ? </label> <form action="insert.php" method="post"> Team Name: <input type="text" name="teamname" /> <input type="submit" /> </form> </body> </html> <br/> </p> </form> <div style="clear:both;"></div> </div> </div> </div>
insert.php
<?php
include(' ../include/session.php')
?>
<?php
$con = mysql_connect("localhost","shadow","mypass");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("pokemon", $con);
$sql="INSERT INTO team (username, team_name)
VALUES
('$_POST[username]','$_POST[teamname])";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "1 record added";
mysql_close($con)
?>
im getting this error
Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '')' at line 3

New Topic/Question
Reply



MultiQuote








|