Simple ticketing system
A few quick tips: 


premature optimization is the root of all evil
use a profiling tool
premature optimization is the root of all evil
Don't echo markup, close php, write markup, open php tag again
premature optimization is the root of all evil
Dont query the DB, if you might have to change header('Location:...') a few lines further down. If you're going to have to redirect, do so ASAP.
premature optimization is the root of all evil
Avoid globals, they're error prone, hellish to debug and generally evil, but not as evil as premature optimization
premature optimization is the root of all evil


All in all, there's not enough code yet to squeeze any meaningful performance gain out of it. Not by altering the code alone, anyway.
If you do decide to use a profiling tool, also look into caching (google APC), and try your hand at bytecode caching. See how many ms you can shave off that way, but always remind yourself of one thing:


premature optimization is the root of all evil