You are here: Newbie question...login system « PHP Programming Language « IT news, forums, messages
Newbie question...login system

Posted by stacey on 08/31/07 15:23

Hi all,

I am trying to create a login system for my site. I've got everything
working properly so far, but I would like to make it a bit cleaner.

Currently, on each page that requires the user to be logged in, I am
checking the session first and redirecting them to the login page if
they are not logged in...else, I display the page contents.

Is there a way that I can, somehow, create some sort of function that
will check a 'config' file to see if the page requires the user to be
logged in? For instance, I'd like to be able to put one call in my
header file that checks to see if the current url requires a login.
What I'm trying to avoid, is having to put the login check in each
specific page.

Also, I would like to save the referring url so I can redirect them
back to where they were trying to go in the first place.

Hope this makes sense...

Thanks in advance for any suggestions,
Stacey

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация