f3tus Posted March 11, 2010 Share Posted March 11, 2010 Basically, I have 3 files: index.html process.php image.php What I want to do is get text from index.html via a form, then in process.php output some text, then show an image in process.php with img src to image.php that converts said text into an image. I can get this to work by adding a variable such as image.php?var=$text to img src, but I would want the image.php to be without a variable, so users can't just go to site.com/image.php?var=something. How do I pass the variable to image.php in process.php and then show it with img src=“image.php“? Link to comment https://forums.phpfreaks.com/topic/194946-create-image-in-page/ Share on other sites More sharing options...
DavidAM Posted March 11, 2010 Share Posted March 11, 2010 You can use a session. Open a session in process.php and store the variable there. Just be sure to close the session (session_write_close()) before you send the IMG tag to the browser. If this is the only reason you are using the session, you can destroy it in the image.php (session_destroy()) after you get the value out of it. Link to comment https://forums.phpfreaks.com/topic/194946-create-image-in-page/#findComment-1024979 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.