I recently have been researching many different forums and articles containing information on how to create a new directory with php. I still have not been able to come up with the answer. I want to be able to create a new directory based on the username that people will input.
I have the variable $username = $_POST['username'];
Then I run the command:
mkdir($username, 0755);
I get this error on the page:
Warning: mkdir(brendan2b): Permission denied in /home/photocoo/public_html/createAccount.php on line 150
I am completely lost with this and how do I go about creating this directory right inside my public_html folder.
Also how would I write the code if I wanted to make this a sub-folder inside photos.
example: /home/photocoo/public_html/photos/mynewfolder
Hopefully someone can give me some help.
Thanks.