i have a question that how to get name of a directory that is dynamically created? explanation-: i create a file upload type and one submit button whenever i clicked submit button then directory is created if not exist with logged in username. but file is not stored there because i can t get a name of directory to store that file. i want how to get that name which function is used in php to get name of directory that is created dynamically.
//$image = $_GET[ upload ];
$upload = $_POST["submit"];
session_start();
$_SESSION[ x ] = "username";
$path = "upload/";
$image_name = $_FILES["upload"]["name"];
$temp = $_FILES["upload"]["tmp_name"];
if(isset($upload)){
mkdir($path.$_SESSION[ x ]);
$new = ""//what function I used here to fetch the name of directory in last step
move_uploaded_file($temp,$new.$image_name);
}