Passing post data

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
lordkaos
Forum Newbie
Posts: 1
Joined: Wed Jan 26, 2005 12:55 am

Passing post data

Post by lordkaos »

I have created a dynamic image file and would like to pass some variables from a post form. Right now I can pass all the info directly into the file that generates the image but I can't get it in from the page I'm showing the image in.
How do I pass the data I've posted into an image tag? It's a good amount of info so having
<img src="image.php?variable_name">
won't work out well. Can anyone help?

M-
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

Moved to PHP - Code
User avatar
CoderGoblin
DevNet Resident
Posts: 1425
Joined: Tue Mar 16, 2004 10:03 am
Location: Aachen, Germany

Post by CoderGoblin »

As I understand your question:

You get lots of information from a form (POST) which is possibly too large for a GET. You need to pass this information to another script which builds an image (Not another form).

My solution would be to use the post values to build the image and store in a temporary file directory. Then all you would need to do is use the filename. If the dynamic image is actually frequently requested with all the post values the same you may be able to work out a method of naming the files/structure to provide a "cache" of images.

Just my initial thoughts.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

or you could stuff it in a session... thats what they're for :)
Post Reply