|
Author |
Message |
m7d7g7
Junior WebHelper
![Junior WebHelper Junior WebHelper](images/rank_1.gif)
Joined: 10 Dec 2003
Posts: 4
|
Posted:
Fri Dec 12, 2003 3:08 am (20 years, 6 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
ok.. it's still not working. I will tell you exactly what happens. when i go to my login.html [with just the login form] and enter the password 'pass' i'm redirected to the blank login.php [the script]. Thats it. If i navigate to the page that i'm protecting it says "You cannot view this page." even though i entered the password. It it helps i only want to pass protect one page. are you sure the code is ok? I tried a bunch of diffrent stuff and cant seem to get it figured out. |
|
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by m7d7g7 Find all posts by m7d7g7](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) |
![](images/spacer.gif) |
adam
Forum Moderator & Developer
![](images/rank_6.gif)
Joined: 26 Jul 2002
Posts: 704
Location: UK
|
Posted:
Fri Dec 12, 2003 4:34 pm (20 years, 6 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
hmm, now that I think about it, you may need to put session_start(); at the top of all the pages (after <?php) |
________________________________ It's turtles all the way down... |
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by adam Find all posts by adam](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) ![Visit Poster's Website Visit Poster's Website](templates/4WebHelp2/images/lang_english/icon_www.gif) |
![](images/spacer.gif) |
m7d7g7
Junior WebHelper
![Junior WebHelper Junior WebHelper](images/rank_1.gif)
Joined: 10 Dec 2003
Posts: 4
|
Posted:
Fri Dec 12, 2003 9:24 pm (20 years, 6 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
nope.. that doesnot work either. I searched around for a script on hotscripts, but couldnot find any that were just a single password to enter. ![Rolling Eyes](/forums/images/smilies/icon_rolleyes.gif) |
|
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by m7d7g7 Find all posts by m7d7g7](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) |
![](images/spacer.gif) |
Nebooaw
Junior WebHelper
![Junior WebHelper Junior WebHelper](images/rank_1.gif)
Joined: 17 Dec 2003
Posts: 1
|
Posted:
Wed Dec 17, 2003 12:07 pm (20 years, 6 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
Hi, i have tried you example as it is almost what i need but i just get Undefined index: whenever i run the pages before i enter in a password.
The redirect page comes up when a valid password is entered but the same message again Undefined variable: _SESSION.
Any ideas?
Can you show me how to use this code with a flat file containing a password and username? When someone enters a valid password the redirect page says "welcome Pete"?
Kindest thanks. |
|
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by Nebooaw Find all posts by Nebooaw](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) |
![](images/spacer.gif) |
adam
Forum Moderator & Developer
![](images/rank_6.gif)
Joined: 26 Jul 2002
Posts: 704
Location: UK
|
Posted:
Wed Dec 17, 2003 6:28 pm (20 years, 6 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
if $_SESSION is undefined, chances are you're using an old version of php. try $HTTP_SESSION_VARS instead.
to use a file containing a username/pass, the easiest (and best) thing to use would be HTTP Authentication |
________________________________ It's turtles all the way down... |
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by adam Find all posts by adam](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) ![Visit Poster's Website Visit Poster's Website](templates/4WebHelp2/images/lang_english/icon_www.gif) |
![](images/spacer.gif) |
|
|
Go to page Previous 1, 2
You cannot post new topics in this forum. You cannot reply to topics in this forum. You cannot edit your posts in this forum. You cannot delete your posts in this forum. You cannot vote in polls in this forum.
|
Page generation time: 0.119326 seconds :: 17 queries executed :: All Times are GMT
Powered by phpBB 2.0
© 2001, 2002 phpBB Group :: Based on an FI Theme
| |