Preventing access to a page in PHP
I am using the phpBB bulleting board, but wish to prevent users from registering themselves (as I will do this on their behalf). I therefore want to have access to the registration page myself, but stop anyone else accessing it.
At the moment, there is nothing to stop someone entering the direct URL of the registration page. I want to add some code to that page that prevents it being served unless the person is authorised to see it.
I work in ASP and am new to PHP. I propose writing a login page containing a password field. If logged in, the registration page can be accessed, otherwise it can't. I know how to do this in ASP, but not in PHP.
Please can you give me some PHP code that will achieve this?
Thanks.
Steve
|