Hello All:
I am using PHP and MySQL in my application. I need to be able to allow
ONLY authorized users access to some pages in the site. For this I am
creating a session variable ''$valid_user", after the user has
successfully authenticated himself with the Database. The pages that
need to be protected are all HTML files. So far everything, works fine.
I am wondering how to finally deploy the logic on all the pages that
need to be protected.
Here is my point of view.
1). Change all the names of the protected documents to .php
2). Use the following script:
<? session_start(); ?>
if (session_is_registered($valid_user)) {
// show the original page
PLEASE TELL me a way to display the same page
}
elseif (!session_is_registered($valid_user)) {
// display an error message to the user asking him to login before he
can see this page
}
many thanks
--Pushpinder Singh
Pushpinder Singh Garcha
_________________________________
Web Architect
- [PHP] Help needed Javi - NeoDigit
- [PHP] Help Needed Pushpinder Singh Garcha
- Re: [PHP] Help Needed 1LT John W. Holmes
- Re: [PHP] Help Needed Chris Boget
- RE: [PHP] Help Needed Carl Brandenburg
- Re: [PHP] Help Needed Jennifer Swofford
- [PHP] Help needed SpiderWebb
- [PHP] Help Needed Pushpinder Singh Garcha
- Re: [PHP] Help Needed Michael J. Pawlowsky
- Re: [PHP] Help Needed Pushpinder Singh Garcha
- Re: [PHP] Help Needed Kevin Stone
- [PHP] Help Needed Pushpinder Singh Garcha
- Re: [PHP] Help Needed Philip Olson
- [PHP] Re: Help Needed Goetz Lohmann
- Re: [PHP] Re: Help Needed Pushpinder Singh Garcha
- [PHP] Help Needed Pushpinder Singh Garcha
- [PHP] Help Needed Pushpinder Singh Garcha
- RE: [PHP] Help Needed Michael Roger C. Bianan
- Re: [PHP] Help Needed Pushpinder Singh Garcha
- RE: [PHP] Help Needed Michael Roger C. Bianan