Hi
I think the directory is already existing there this is why it is giving you an error. You have even made some mistakes in you code. The following should be in quote
Else it will create the directory $name and not the value that $name refers to.
One more thing is that , you need to define the $name before you try to create a directory otherwise the value will be empty. check the following part of the code.
Code:
$name = ucfirst(strtolower($_POST['username-reg']));
if (is_dir($name)) { mkdir($name, 0777); }
If any more query do post back.
Bookmarks