Fixed database selection for editing events.

It was just filling in data before the other php page was loaded, causing it to not see the correct info.