Query:
$sql = "INSERT INTO reviews (date, author, game) "; $sql .= "VALUES "; $sql .= "('$date', '$_POST['author']', '$_POST['game']')";
The error:
Parse error: parse error, expecting T_STRING' orT_VARIABLE' or `T_NUM_STRING' in LOCATION on line 14
T_STRING' or
It's the 's in the array name that's causing the problem. This will work: $sql .= "('$date', '$POST[author]', '$POST[game]')";
But a much better solution is to extract the data before building the sql statement i.e. $author = $_POST['author'];
And then validate $author.