|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
|
|
#1
|
|||
|
|||
|
Directory Protection
I can login to various directorys by putting the line below as the beggining line in the index.php of various directories, and so a user can login, i.e each directory has its own username and passwd.
this is the line <?php require '/path/to/_restrict.php'; ?> and the user will login. But now what I want is to have amain page whereby all users access one page and each user is directed to his/her directory or page so I create login.php and I made it like this <?php require'/usr/local/apache/htdocs/users/_restrict.php'; if (isset($_SESSION['psaun'])) { header ('Location: http://server.com/'.$SESSION['psaun']); exit; } ?> Also, When I put this line : <?php echo '<pre>'; print_r($_SESSION); echo '</pre>'; ?> in my directory index file, i.e index.html, where am able to login, I get the results as below, if it could shed more light. Array ( [psaun] => meric [remote] => 213.177.x.x [psag] => 100003 [psau] => 2 however from my login.php. I still fail to login with an error message of access restricted for that directory ,can someone p;se help me thanx |
|
#2
|
|||
|
|||
|
RE: RE: Directory Protection
Tried it but its also not working...
Thanx Eric Quote:
|
|
#3
|
|||
|
|||
|
RE: Directory Protection
check this thread out and see if it helps.
http://codewalkers.com/forum/index.php?action=displaythread&forum=phpcoding&id=319&realm=default |
|
#4
|
|||
|
|||
|
RE: Directory Protection
You could always just try .htaccess and .htpasswd if you can't find an easier way.
|
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > Directory Protection |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|