PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 10th, 2000, 07:02 PM
baldwnad baldwnad is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 30 baldwnad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 14
Send a message via ICQ to baldwnad
I am trying to display multiple pictures/text/other html content onto a page. I am pulling the picture binary data right out of a MySQL database and slamming it to the user. I can get 1 picture to display but that is it. I have code if you want see it, but I don't think it will help in this situation. The headers info I have tried to send it either.

Header ("Content-type: image/gif"); AND
Header ("Content-type: text/html");

Please help. I am loooooooosing my mind!

Reply With Quote
  #2  
Old July 10th, 2000, 08:34 PM
freddydoesphp freddydoesphp is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2000
Posts: 669 freddydoesphp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 13
I know you can only send Header once on a page. You should try including an external file that has a function that prints the image data out in it and then includes it your page, so you are only using one Header per image that you want to use

Reply With Quote
  #3  
Old July 10th, 2000, 08:39 PM
baldwnad baldwnad is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 30 baldwnad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 14
Send a message via ICQ to baldwnad
So you are saying that I should use a
include("include.php");

to do all of my processing...and then slam it out to the page? I think I have tried that , but I will give it a shot...Anybody else any any ideas?

Reply With Quote
  #4  
Old July 11th, 2000, 06:15 PM
baldwnad baldwnad is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 30 baldwnad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 14
Send a message via ICQ to baldwnad
If anyone cares this is how I finally got it to work. It may not be that pretty, but it worked.

display.php just pulls the picture out of the database and slams it to the browser per the ID you give it.
--->display.php<---
mysql_connect("localhost", "root", "letmein");
mysql_select_db("devgallery");

$query = "Select picdata from pictures where(ID=" . $ID . ")";
$result=@mysql_query($query);

$data=@mysql_result($result,0,"picdata");
echo $data;
------END display.php<--------

To call a picture up you could reference in any HTML docuemnt this line

<img src="http://www.foobar.org/display.php?ID=1">

or the ID of the picture binary data you want to slam to the browser.

Full code is avalible for any of my php projects at http://www.geekgetsthegirl.com/projects


Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > Multiple pictures, headers?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap