This is your solution. What this code is doing is finding if the folder "DESIREDFOLDER" folder exists on your server; if not, it will create one for you; if so, it will not do anything. Also, change "DESIREDFOLDER" do your desired folder name. Have fun.
PHP Code:
<?
$dirname = $_POST["DirectoryName"];
$filename = ("/home/site/public_html/DESIREDFOLDER/");
if (file_exists($filename)) {
echo "";
} else {
mkdir("/home/site/public_html/DESIREDFOLDER/", 0777);
echo "";
}
?>