1 Replies - 653 Views - Last Post: 15 May 2009 - 05:02 AM

#1 ptamzz  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 103
  • Joined: 04-March 09

Page access regulation help

Posted 15 May 2009 - 04:43 AM

I've created a site in php. everything is working including user authentication; but i don't know how to work with page access reguation.

I want the admin files to be protected such that when someone typed the exact location of the file in the address bar, it is not shown.

I'm trying to do with sessions but i think i need some help with that. Can anyone here direct me to any tutorials websites or anything?? or if it is that simple, can anyone explain how to do it here??

Is This A Good Question/Topic? 0
  • +

Replies To: Page access regulation help

#2 ahmad_511  Icon User is offline

  • MSX
  • member icon

Reputation: 131
  • View blog
  • Posts: 722
  • Joined: 28-April 07

Re: Page access regulation help

Posted 15 May 2009 - 05:02 AM


the following is a simple logic to accomplish this:

before anything on the page you can add a php script to check if there is a specific session or not.

-now, in case there is no sessions has been created you have to forward the user to your home page or access denied page or whatever you want

but if you found that a specific session is already created, you'll have then to check its privileges to display view this page or not
if it's not ok then redirect him to home page/ access denied page
otherwise let the page's loading continue

if you have any problem doing this, you can always add more details and someone will be happy to give you a hand
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1