Dear all,
I have a problem with my Image
1. Normally, when I get the Image ($Imgfile) from the form, which is in the same file with the $Imgfile, then I can insert all parameter such as: $Img_data, $Img_name, $Img_type, $Img_size with
- But now, I need to getl the values: $Img_data, $Img_name, $Img_type, $Img_size from the FORM on the other file with $Imgfile, with the following code:
$Img_data = addslashes(fread(fopen($Imgfile, "r"), filesize $Imgfile))); // This one is inserted into DB well
$Imgname = addslashes($Imgfile); // I don't know how to get Image name here
$Imgsize = filesize($Imgfile); // This one is inserted into DB well
$Imgtype = filetype($Imgfile);// This one is inserted into DB well
but just return the file type is FILE, the one I want to get is file type like GIF/JPEG.
I also check the SQL query, I works well.
Somebody who knows this pls hepl me
Thanks a lot
Dung