Hello evrybody
This is taking my head off...
I can't view a binary files located on my local machine(pc). My scripts are located on a unix server.
The form works fine if I remove the ENCTYPE but of course I need to view the bianry data it so it is not good for me...
Here is html form:
<HEAD>
<TITLE>Insert Binary Data in a Database</TITLE>
</HEAD>
<BODY>
<H1>Upload a File:</H1>
<FORM name="insert" method="POST" action="upload.php">
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="150000000">
<INPUT type="text" name="id" size="30" value="12">
<INPUT type="file" name="img1" size="30">
<br><br>
<INPUT type="submit" name="submit" value="Use this File">
</FORM>
</BODY>
And here is the php:
<?
$binary_junk = addslashes(fread(fopen("$img1","rb"), filesize("$img1")));
echo $binary_junk;
?>
does anybody know how the solution to this pb...
thx
fred