Hello,
I have tried to create a way though which users can create there own photo gallery but for that i created a code via whihc users can create their own folder but things a i want to do in a litle tricky way. Wank to allow users to create folder whiin the folder can anyone would to let me know hwo it can be done
Create folder
function create_gallery($connect) {
$description = $_POST['description'];
$visibility = $_POST['PrivacyLevel'];
$id = $_POST['uid'];
$dirname = $_POST["GalleryName"];
$dirpath = "./usersdata/".$dirname ;
$create = mkdir($dirpath, 0755, true);
$insert_query = mysqli_query($connect, "INSERT INTO usersdata (uid, dir_name, description, visibility) VALUES ('$id', '$dirname', '$description', '$visibility')");
if($insert_query) {
$_SESSION["message"] = "Your New Gallery Created";
header("Location: user.php?uid=".$_SESSION["uid"]);
} else {
$_SESSION["message"] = "Gallery Creation Failed";
header("Location: user.php?uid=".$_SESSION["uid"]);
}
}