Replace foldername with your directory name, $chmod with the chmod the folder should have (777 for full access). If you need mkdir to create folders recursively, set the 3rd parameter to true (which when you suggest a directory name like "path/folder" it will first create a folder named path and then create a folder named folder).
The method will return true upon successful creation and false if something fails.
Thank you, I'll try and use that, I want the folder to be the username of the individual. We'll see how I can make it work, thank you very much for your help. +rep