I'm having this Weird problem with image upload.
If I have on the same file the form to upload the image file and the script, it works perfectly, but if I have the form in one file and the script in another one, it doesn't. It seems that the form doesn't pass the vars. Could someone please help me?
$T = time();
$FNAME .= "$T.jpg";
$ipath = "profiles/images/";
if(!$_FILES['imagefile']) { print "No files to upload"; exit; }
if($_FILES['imagefile']['type'] == "image/pjpeg"){
copy ($_FILES['imagefile']['tmp_name'], $ipath.$FNAME) or die ("ERROR uploading.");
}
}