Rather than creating $_GLOBAL variables, you'll want to start sessions and carry them through using the $_SESSION array. Take a look at this-


Using session_start() and session_destroy() to create and end login sessions. Be sure to use session_start() at the top of any new page to access the already created session. Good luck.

Ranjit Viswakumar


Link edited out. Please refrain from linking to your web site. Thanks.