hi all,
errmmm....i am not sure how to do this...i have done uploading of images where i only upload the path of the image.like this:
PHP Code:
//checking with this function checkfile($inputname,$inputsize,$inputtype,$size){ global $error;
if($inputsize==0){ $error[]="Please select a picture for your product!"; } elseif($inputsize>$size){ $error[]="File size can be maximum ".$size." bytes!"; } elseif(is_uploaded_file($inputname)){ $file_type=$inputtype; $allowed_types=array("image/bmp","image/gif","image/pjpeg","image/jpeg");
if(!in_array($file_type, $allowed_types)) $error[]="File type not permitted! (Please use jpg, jpeg, bmp, or gif images)"; } }
PHP Code:
//inserting to database $uploaddir = "img/userPics/";