realmxofxnoise Posted February 23, 2007 Share Posted February 23, 2007 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 Quote Link to comment Share on other sites More sharing options...
mcastles Posted February 24, 2007 Share Posted February 24, 2007 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. Quote Link to comment Share on other sites More sharing options...
magic2goodil Posted February 24, 2007 Share Posted February 24, 2007 You will need to use a .htaccess file to help control access to these folders as well so that they are user specific. Quote Link to comment Share on other sites More sharing options...
realmxofxnoise Posted February 26, 2007 Author Share Posted February 26, 2007 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.