How to create forbidden page

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
zenon
Forum Commoner
Posts: 42
Joined: Fri Jan 23, 2009 1:41 pm

How to create forbidden page

Post by zenon »

Hello.

I created a database with MySql and i connected it with php.
With html code and php i created a login page. All the data are in the database.
Through php files, i manage some folders which contain pictures and other private data.
Now, i want to make a forbidden page in these folders, so users that are not logged in, can't have access.
For example, http://www.example.com/folder/ .

Is there any idea?

Thank you very much.
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Re: How to create forbidden page

Post by jayshields »

I think you've got the name forbidden page from Apache, but that's for when Apache is handling the log ins. If you've done the login with PHP then you'll probably want to set a session variable to show the user is logged in, then check for it when access to a forbidden page is requested.
Post Reply