Homepage edit functions and new save functions added

Changes:
1.  Homepage edit function now loads event details onto input page.
2.  Save button now checks whether this event has been entered before,
if it has, update the database, if it hasn't, add a new row to the
database.
3.  Fixed the issue with courses not being added.
4.  Added new global variable "existingID".  It is used to check whether
an event is new or old.