Hi
In following the article:
http://www.devarticles.com/content....cleId=68&page=1
which teches how to basically upload binary data whether its jpeg or gifs, etc into a mysql database.
I get the following problem when running the script to insert data in the tables (the file grabfiles.php).
Warning: fopen("", "r") - No such file or directory in c:\apache\htdocs\test\grabfile.php on line 30
Warning: fread(): supplied argument is not a valid File-Handle resource in c:\apache\htdocs\test\grabfile.php on line 31
Basically, line 30 and 31 are :
$fileHandle = fopen($fileUpload, "r");
$fileContent = fread($fileHandle, $fileUpload_size);
I commented out the following if statement because it would pull the error messages or the condition i.e you must enter....
if(empty($strDesc) || $fileUpload == "none") die("You must enter both a description and file");
Since this is a new installation of PHP 4.2 i get the impression it does not like the variables when referred to as $myVariable, but does understand when the data is posted to the php script:
$HTTP_POST_VARS["myVariable"];
I have tested this from a a html form, when the user click submit, the following does work:
echo $HTTP_POST_VARS["strDesc"];
but this does NOT work:
echo ("$strDesc");
Is this the new way php 4.* does things?
Can anyone help, i get the impression that if the issue with the variables works, then the whole thing with the image storage stuff will work.
Many Thanks
Sunit