I am writing a script to insert data from 2 text fields, into a database.
I am getting this error:
Parse error: syntax error, unexpected T_VARIABLE in d:\hshome\c239198\local54memberforum.com\submitcomment.php on line 26
Here is lines 21 - 28:
if (mysqli_connect_errno()) {
echo "Error: Could not connect to database. Please try again later.";
exit;
}
$query = "INSERT INTO comments VALUES ('"$name"', '"$comment"')";
$result = $db->query($query);
any ideas?