Login redirect


#1

This is actually a couple issue’s
Basicly im trying to create a webpage that users can register login and have webspace to either upload data or create a webpage… I have created the upload script and registration script and databases. Now i just need help with getting the registration script to create a folder in the users folder with the username of the person, ie if i register the name prophit it will create a prophit folder. So I need help with creating that and with this,

Second thing would be that the upload script will reconize who the user is and upload the data in the proper folder, ie… if im logged in as prophit it will upload the data to the prophit dir.

If you need examples of my scripts i will post… They are kinda long but they get the job done… Thanks for the help…


#2

So what are you seeking help in doing? What are you asking?


#3

Well I would like for when the user registers it will create a folder in a directory for example /users/prophit, when the user id prophit becomes registered. Then when he logs in it will redirect him to that folder. Within that folder he will be able to access his own files that he as uploaded.
Example
I register the user ID of prophit. The script has added in all my info the the database and created a folder /users/prophit/.

Second thing would be that the upload script i created would reconize the user logged in (using sessions) and upload the file to his directory.
Example
Now that I’m logged in i want to upload img.jpg to my folder. I find the file and hit upload. The upload file script will see who I am(prophit) and upload the file to my folder, /users/prophit/

I need to know how to create those part’s of the script


#4

So you are looking for a basic direction - Correct? We will start with your first problem. First palce to start is always in the manual. Check out the functions available for directories ( http://www.php.net/manual/en/ref.dir.php ) and filesystems (http://www.php.net/manual/en/ref.filesystem.php ). That should give you a general idea of what is available to you. Come up with some pseudocoded logic using some of the functions you find (feel free to ask questions about your logic). I would recommend posting that first to see if anyone can find holes and clean it up. Only then should you actually start coding and we will of course help you with any specific problems you have while you are working on it.

You can do it.