You are here: Re: Protection of admin pages « PHP Programming Language « IT news, forums, messages
Re: Protection of admin pages

Posted by Gordon Burditt on 02/06/06 21:07

>How to protect administration pages from entering.
>I put login form on my start page (index.php), and if user put correct
>data, script redirect him on page admin/admin.php. That works fine!
>But if someone types in browser admin/admin.php it eneteres same page
>without login. How to prevent this?

You put login checking on *EVERY* *SINGLE* *PAGE*. (Usually it's
in one file defining a function or class included from everywhere
else). The checking usually looks at session data to see if you're
logged in, and the login hasn't expired, and if not, redirects you
to the login page.

If you're not using sessions, you probably check cookies. Remember
that session data like $_SESSION['logged_in'] = true is hard to
spoof, but $_COOKIE['logged_in'] = true is easy to spoof.

Gordon L. Burditt

 

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

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