O.K. I still got the problems. I`ll paste everything needed here and
please, if anyone knows how to make it work, let me know.
*First, the part of the form is the following:
<INPUT TYPE="file" NAME="file">
the enctype in my form tag is ENCTYPE="multipart/form-data" and METHOD =
POST
*The code that actually *should* take care of the upload process to
mysql, is the following:
if (isset($file) AND $file != "none" AND strlen($file)>2){
$file_data = fread( fopen($file, 'r'),
filesize($file) );
$theq = "INSERT INTO pildid
(file_name,file_type,file_data,tyyp,subid,picnr) VALUES ('$file',
'$file_type', '".addslashes($file_data)."','travels','$it','0')";
$result = mysql_query($theq);
}
And the errors I get, are':
Warning: fopen("C:\\ajutine\\Kevad.jpg","r") - No such file or directory
in /home/einfeldt/public_html/bt2/reis.php3 on line 62
Warning: Supplied argument is not a valid File-Handle resource in
/home/einfeldt/public_html/bt2/reis.php3 on line 62
INSERT INTO pildid (file_name,file_type,file_data,tyyp,subid,picnr) VALUES
('C:\\ajutine\\Kevad.jpg', '', '','travels','9','0')
Thanks
Siim Einfeldt
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]