Jump to content

User Registration & Directory Login


neridaj

Recommended Posts

Hey,

 

I have a client who wants to allow users to register & login to "their" directory where they can then download a zipped folder or view the contents of a folder of images to then download the selected images. Is there a way to create a directory when a user registers, bases on their username, and then once logged in allow them only access to that directory?

 

Thanks,

 

Jason

Link to comment
https://forums.phpfreaks.com/topic/89414-user-registration-directory-login/
Share on other sites

As far as the making the directory question.  Just pull their name from the database (or session if u keep their name in a session).  then...

 

$name='Jimmy Dean';
$path='users/'.$name;
if(mkdir($path)){
    //success
}

 

Make sure there are no spaces in the $name.  Use something like str_replace(" ", "_", $name);

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.