Sandip Posted March 18, 2007 Share Posted March 18, 2007 Is there any work around for printing data of two different MIME types in same file? I am fetching images from database and at the same there is some HTML also. Once I set content type to image I cant print HTML. Printing image from database is another function. How can I print or override headers? Thanks , Sandip Quote Link to comment Share on other sites More sharing options...
chawezul Posted March 18, 2007 Share Posted March 18, 2007 If you get have a PHP file that gets the image form the database then echo()'s it out, you can put header("Content-type: image/gif"); at the end to have it sent as an image (in this case gif), from there you can embed it in your HTML page with your basic img tag Quote Link to comment Share on other sites More sharing options...
Sandip Posted March 18, 2007 Author Share Posted March 18, 2007 Actually I am ouputiing HTML through PHP. And once I set it to image type I am nt able to echo any HTML . I can see image or HTML but not both on same page. Quote Link to comment Share on other sites More sharing options...
Sandip Posted March 18, 2007 Author Share Posted March 18, 2007 Solved. I used a function to echo image. After looking at some other web site I made one seperate file to spit out image. So headers are not messing up anymore. Thanks anyways. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.