Hi,
I used a tutorial to upload a picture to the dbase which worked fine. The problem is calling it and getting it to print the picture and not the binary mish-mosh. Below is what I have so far. The other problem is the header. It keeps telling me Cannot add header information - headers already sent by... Any help would be greatly appreciated. Thanks...
if($id) {
@MYSQL_CONNECT("localhost","name","password");
@mysql_select_db("dbase_name");
$query = "select bin_data,filetype from table_name where id=$id";
$result = @MYSQL_QUERY($query);
$data = @MYSQL_RESULT($result,0,"bin_data");
$type = @MYSQL_RESULT($result,0,"filetype");
#$getdata.php3?id=1;
header("Content-type: image/pjpeg");
echo $data;
}
?>
<form method="post" action="<?php echo $PHP_SELF; ?>" enctype="multipart/form-data">
ID Number:<br>
<input type="text" name="id" size="3">
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="1000000">
<br>
<p><input type="submit" name="submit" value="submit">
</form>