I want my users to be able to upload images to my website.
I think I need to change the folder permissions for this uploading to work, not sure how to do this though, I have tried the below but it doesn't work.
$uploaddir = chmod("/images/directory", 0777);
Here is the code for the page:
$uploaddir = "/images/directory"; // Where you want the files to upload to - Important: Make sure this folders permissions is 0777!
if(is_uploaded_file($_FILES['file']['tmp_name']))
{
move_uploaded_file ($_FILES['file']['tmp_name'],$uploaddir.'/'.$_FILES['file']['name']);
}
print "Your file has been uploaded successfully! Yay!";