Dear friends,
Does anyone know how to get Image Binary data from one FORM in another file to insert into MySQL Database???
More details:
Normally, I used this command (in the getData.php file) to get Binary data when the Image file ($Imgfile) is call from a FORM in the same file with this command, it works well, then I can insert Binary Data of the Image as BLOB format:
$Imgdata = addslashes(fread(fopen($Imgfile, "r"), filesize($Imgfile)));
But when the FORM that contains the Image file name is stored in another file (included file, called showForm.php), It does not work as that way. This is the form in the file showForm.php
<td width="28%"><b>Image file * :</b></td>
<td colspan="2"><input type="file" name="Imgfile"></td>
Please help.
Thanks a lot
NMDung
PS:
Dear elesueur,
I try your way many time link this:
$Img_data = addslashes(fread(fopen($FILES['Imgfile']['tmp_name'], "r"), $FILES['Imgfile']['size']));
It does not work. Do you have any other suggestion?. Thanks