Reputation: 537
I have my user mgmt system setup, but how do I re-direct and restrict a user to her/his folder/sub-folders/files according to the $_SESSION['uid']; $_SESSION['pwd'];
established when s/he logs in?
I'm using a MySQL-based user mgmt setup.
Upvotes: 0
Views: 221
Reputation: 99
what about this 1st if you dont provide null password
if($_SESSION['uid']=="")&&( $_SESSION['pwd']==""))
{
header('Location: http://www.example.com/');//redirect where ever you want
}
2nd if you provide even null password
if($_SESSION['uid']=="")&&( $_SESSION['pwd']!=""))
{
header('Location: http://www.example.com/');//redirect where ever you want
}
Hope this help you..
Upvotes: 1
Reputation: 57703
You need to know how to map a uid
to a folder. If you have the folder location stored in the database somewhere, do a query to find it and do a header("Location: /the/folder");
header-redirect.
Upvotes: 1