Webmaster Forum

Webmaster Forum (http://www.v7n.com/forums/index.php)
-   Coding Forum (http://www.v7n.com/forums/forumdisplay.php?f=16)
-   -   Directing specific users to a specific folder (http://www.v7n.com/forums/showthread.php?t=26865)

Kenny Fix 03-14-2006 03:36 AM

Directing specific users to a specific folder
Hi all

Hope someone can help...

I want to create a simple log in form on my site which takes users to a specific cPanel password protected directory. The form needs to recognise the user name and thus direct that specific user to a specific password protected folder (eg: if joe1 logs in with the correct password he will be taken to the password protected folder named 'joefolder1').

All the login/password details need to be entered directly into a form on my site rather than using the default browser username/password pop up in Internet Explorer.

Sorry if this is basic stuff but I have trawled the forums for a similar posting and can't find anything that helps me out.

Any pointers would be genuinely appreciated.

Thanks in advance.


Immo 03-19-2006 04:16 AM

In the database that stores the usernames and passwords you could add another column that specifies the directory the person is forwarded to.

After you have done that you can then do something easy in php like this.

Assuming you use the sessions as detailed below, its like this, oh and the 1 on the logged in session means Yes.

if ($_Session['loggedin'] == "1") {
header ("Location: $data['forwarded directory out of database'];

If you need a hand with it im sure if you post the login script then someone can help you.

Kenny Fix 03-19-2006 06:33 AM

Immo... sincere thanks for this - i was hoping it would be something fairly simple along these lines so big thanks for taking the time to explain what i need to do.

Muchos Gracias.


Immo 03-19-2006 08:57 AM

No probs, any other problems you know where to ask :)

All times are GMT -7. The time now is 04:30 AM.