// profile picture upload
if (isset($_FILES['profilepic'])) {
if ( ((@$_FILES["profilepic"]["type"]=="image/jpeg")
|| (@$_FILES["profilepic"]["type"]=="image/png")
|| (@$_FILES["profilepic"]["type"]=="image/gif"))
&& (@$_FILES["profilepic"]["size"] < 1048576) ) //1 Megabyte
{
$chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
$rand_dir_name = substr(str_shuffle($chars), 0, 15);
mkdir("userdata/profile_pics/$rand_dir_name");
This is the directory all my files are: C:/xampp/htdocs/asweb
And this is where I want to keep the new directory: C:/xampp/htdocs/asweb/userdata/profile_pics