Forum Moderators: coopster
[webmasterworld.com...]
I found this in the library, I guess you can't reply to it so I've started a new topic. I want to display blob images in the content of my website.
I can display blob images on their own page by setting the header to image/gif. When I use the code in my website I get the headers already sent message as the headers are originally set to text/html.
Is there a way of displaying many content types on one page? Or is the only way of overcoming this problem to use output buffering?
thanks
Tom
<img src="getblob.php">
So you may have a script generating the "parent" page, but then you have a different script (or call the same with parameters so that it can decide whether to generate parent or elements) for the image itself.
$row = mysql_fetch_array(mysql_query("SELECT * FROM $my_table WHERE `username`='$username'"));
if($row){
mysql_query("DELETE from $my_table where `username`='$username'");
}
mysql_query("INSERT INTO $my_table (username,image) VALUES ('$username','".addslashes($new_image_data)."')");
But i'm concerned that by storing the username with the blob data I am defeating the point of using blobs in the first place. Does this seem like an o.k way of doing it? I have validated the image using a few different methods. It's a small site so I guess I may be worrying about security too much...