I am new to PHP or just not good at it lol, I have been trying to insert checkbox elements into a mysql database.
I have a table called Team with two collumns.
Id int not null auto increment PK
team varchar 30 not null
<?
<body><form action="insert.php" method="post">
select team:
<input type="checkbox" value="AR" NAME="team[]">:Argentina
<input type="checkbox" value="PL" NAME="team[]">:Spain
<input type="checkbox" value="GB" NAME="team[]">:Holland
<input type="checkbox" value="FR" NAME="team[]">:France
<br>
<input name="confirm" type=submit id="confirm" style='border:1px solid #000000;font-family:Verdana, Arial, Helvetica, sans-serif ;font-size:9px;' value='Confirm'>
</body>
</form>
?>
This is the insert.php
<?php
$con = mysql_connect("localhost","****","*****");
if (!$con)
{
die('Could not connect: ' . mysql_error());
if (!$id) {
$id= null;
}
<?
if(isset($_POST['team']))
{
$team = 1;
$insert=mysql_query("
INSERT INTO team('team') VALUES ('" . $team. ");
?>
Parse error: syntax error, unexpected '<' in C:\wamp\www\examples\insert.php on line 10
Any help or suggestions will be much appreciated.