Alright I don't know why this line code isn't working. I have used it on a site before so now I am coping and pasting and I get an error on this site but didn't get one on the last.
$query = "INSERT INTO calendar (group, date, subject, info,)
VALUES ('$group', '$date', '$subject', '$info')";
^^^^ My query
if(mysql_query($query)){
echo "Form Successfully Submited!";
}
^^^^ Submitting the query
Like I have said I have used this code before with no error but now I get a error. The error says Query Submit Failed: 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 'group, date, subject, info,) VALUES ('SlowTheTurtle', '0412014', 'asdfasdf', 'a' at line 1
$infovariable? If so, not only will it crash this query, but your code is open to SQL injection. Note also thatmysql_*()is deprecated and should not be used for new code. Usemysqli_*()orPDOinstead.