I'm trying to make a new directory to handle profile pictures, but every time I upload the image, nothing happens as in the new directory is not created and there are no errors whatsoever. I already checked the Apache error log, but didn't notice any error pertaining to my recent code...
Here's a sample of my code
//profile image upload script
if (isset($_FILES['profile_pics'])) {
if (((@$_FILES["profile_pics"] ["type"] == "image/jpeg" || (@$_FILES["profile_pics"] ["type"] == "image/png") || (@$_FILES["profile_pics"] ["type"] == "image/gif")) && (@$_FILES["profile_pics"] ["size"] < 1048576)) ) // LESS THAN ONE MEGABYTE
{
$chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
$rand_dir_name = substr(str_shuffle($chars), 0, 15);
mkdir("userdata/profile_pics/$rand_dir_name");
else {
}
} }