this is my php code,it works properly before inserting,can it be the fact that i have attatched a photo to my form?
the other problem is,i dont know what type is photo for my xampp database,i left it a VARCHAR, the error i get is:
Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\toyota\test.php on line 14
<?php
$link = mysql_connect('localhost', 'root', '');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db("forum") or die(mysql_error());
$username = $_POST['username'];
$photo = $_POST['photo'];
$comment = $_POST['comment'];
$query = "INSERT INTO comments(username, photo, comment) values('$username','$photo','$comment');
$result=mysql_query($query);
if ($results)
{
echo "insert complete";
}
mysql_close($link);
?>
your help will be highly appriciated