$project = (isset($_POST['projectName']) ) ? $_POST['projectName'] : '';
$dirname = "C:\\\\Bitnami\\wampstack-5.4.33-0\\apache2\\htdocs\\projects_data\\";
mkdir($dirname.$project, 0777, true);
if (isset($_FILES["gallery_images"]["name"]))
{
move_uploaded_file($_FILES["gallery_images"]["tmp_name"], "$dirname/$project/" . $_FILES["gallery_images"]["name"]);
$image = "projects_data/$project/" . $_FILES["gallery_images"]["name"];
}
This will create a folder dynamically in the name of $project at the specified location.
Thanks for the help though.