code that saves an event as cordinate s in a mysql database