I have an authentication file that I use to authenticate users for certain pages. The authentication uses a MySQL database to hold users and passwords. In that file I have a variable $id. I include the authentication file at the top of all the pages that need authenticating but that also brings in the $id variable, which is causing some confusion on other pages. Is there anyway I can make that $id variable local only to that page? For instance, if this was Perl I could just say:
my $id = param('id');
I want to be able to do a similiar thing in php. Any ideas?