Just a small point, well actually I dont think its that small.
Coding your INSERTS the way you have, your query is dependant upon the order that the fields were created in the table, if somebody moves the order of the fields on the database, because they think it looks nicer with year following date, your code will be really messed up.
If you code your query like this:
INSERT INTO $table (`event`, `date`, `name`, `year`) VALUES('$event', '$date', '$name', '$year')
You are specifying the field names and the data in the same order, it cannot go wrong even if somebody changes the creation order on the table.
You never need to specify the ID (autoincrement) fields as MySQL looks after creating those as only it knows what it should be.
If you need to see the id that is created there is a PHP command to ask
mysql_insert_id()
So for example:
$q = "INSERT INTO $table (`event`, `date`, `name`, `year`) VALUES($event, $date, $name, $year)";
$result = mysql_query($q);
if ( $result === TRUE ) {
$created_id = mysql_insert_id($result);
} else {
INSERT FAILED so do your error processing here
}