So here's the deal i have a upload system works smoothly until it gets down to moving the files. the code checks if there is a directory with that name and if so it's suppose to put it in there if not create the directory and still put the file in that directory. So obiviously there's something wrong with my if statement could someone work this one out with me?
if(file_exists("vaksites/uploads/" . $_POST["subject"]))
{
move_uploaded_file($_FILES["file"]["tmp_name"],
"vaksites/uploads/" . $_POST["subject"] . $_FILES["file"]["name"]);
echo "Stored in: " . "vaksites/uploads/" . $_POST["subject"];
}
else
{
mkdir("vaksites/uploads/" .$_POST["subject"]);
move_uploaded_file($_FILES["file"]["tmp_name"],
"vaksites/uploads/" . $_POST["subject"] . $_FILES["file"]["name"]);
echo "Stored in: " . "vaksites/uploads/" . $_POST["subject"];
}
thanks for the helpful eye guys




Help







