Update events.php

Fix PHP errors and separate time input