Jump to content

PHP/MySQL Login System Help (Need to redirect to directory)


realmxofxnoise

Recommended Posts

Hi Everyone,

 

First off, thanks for taking the time to look at my post.  I'm a first time user of PHPFreaks and so far it seems like a nice site.  So thanks for having me.

 

I did some searching on the forums to see if my question could have already been answered but no such luck as of yet. 

 

So, onto the question:

 

I used a script for creating a PHP/MySQL login system.  It works just fine, I'm just having a problem trying to figure out how to get it to point the user that logs in to a certain directory.  I will have a directory/area of the site that will be designated to them.  So I don't want the other users that login with their own user/pass combo to have access. 

 

So I need it to direct the person that logs in to a certain directory based on the user/pass combo.  Is this possible, and if so any help would be greatly appreciated.

 

Thank you,

 

    Nick

have you tried using headers?

header("Location:/filespath/".$userpathspecified);

 

It might be better to display the directory area depending on what the user has assigned in their account in database. If that makes sense.

This sort of makes sense to me.  I'm fairly new with this stuff but I think I understand.  Now - would this keep things secure and prevent a user from manually entering a different user's directory location? 

 

So after they hit submit on the login system, would I just do a if/then/else statement and check the username and if $user1 just include $user1_files, etc etc? 

 

Any more help would be greatly appreciated.

 

Thank you,

 

    Nick

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.