Admin pages & forcing logon

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
vfm
Forum Commoner
Posts: 32
Joined: Tue Mar 30, 2010 10:47 pm

Admin pages & forcing logon

Post by vfm »

Hi,

I have a series of admin pages which enable the end-user to update things in the database. However at the moment, anyone can type in the URL and get to the page.

I've never worked with secure pages before so I wouldnt even know where to start, but how do I make these pages only available to people that have logged in successfully? Is there a generic include I could add to my pages which will do this for me?

Cheers,
Kieran.
amargharat
Forum Commoner
Posts: 82
Joined: Wed Sep 16, 2009 2:43 am
Location: Mumbai, India
Contact:

Re: Admin pages & forcing logon

Post by amargharat »

You have to make login page for admin pages and after login we have to enable and maintain the session.
Now once user is logged in, you have to perform search to check whether session is enabled or not. if logic finds session enables then allow user to access respective page
vfm
Forum Commoner
Posts: 32
Joined: Tue Mar 30, 2010 10:47 pm

Re: Admin pages & forcing logon

Post by vfm »

Hi,

That logic makes sense. Are there standard snippets of code out there that I could use? As I said, I'm very new to all of this.

Cheers,
Kieran.
Post Reply