Hello all,
I get Image filename, data, type, size in the file InsertImage.php. This image is called from a form, which is in another file called Upload.inc. But the problem is when I used this command in InsertImage.php
$Img_data = addslashes(fread(fopen($Imgfile, "r"), filesize($Imgfile)));
with the $Imgfile is the file called from the form of Upload.inc.
Then I used SQL query to insert all the information, including
Image data ( value: $Img_data) into the database as following:
$result=MYSQL_QUERY("insert into user (Img_data, Imgname, Imgsize, Imgtype) values ('$Img_data', '$Imgname', '$Imgsize', '$Imgtype'") ;
The result is all the informations are inserted as well, except the value of $Img_data' always returns wrong size of BLOB data link this (BLOB-57Bytes), while the real size of the Image is 230Kbytes.
Normally, if the Form that contains the Image file name is in the same file then every thing goes well, but here, the the FORM containing Image is in another file 🙁
I am goind around this problem my self for 2 weeks already, but can not solve it. Can somebody help me ?
Thanks a lot
NMDung