SDraconis Posted September 16, 2006 Share Posted September 16, 2006 For those familar with JSP or Java Servlets. there is a way to bind an object to an HTTPRequest using setAttribute and then forward this request to another page (most often used when you have separate pages for data processing and data presentation). I was wondering if there was an equivalent to this in PHP. So far, the only thing I've found that keeps data across different pages is sessions. I am fairly familiar with using sessions, and I know specifically that I do not want to use them in this case. Quote Link to comment Share on other sites More sharing options...
mainewoods Posted September 16, 2006 Share Posted September 16, 2006 the only other ways are cookies, url parameter passing, and hidden form field passing. that's the only ways any of us have. all the ways of maintaining state on the web require extra coding and all can have potential page breaking ideosyncracies. Maintenence of state on the web sucks and it is not going to change anytime soon. Quote Link to comment Share on other sites More sharing options...
markbett Posted September 16, 2006 Share Posted September 16, 2006 you can also post it from page to page... Quote Link to comment Share on other sites More sharing options...
SDraconis Posted September 16, 2006 Author Share Posted September 16, 2006 Since the data is an actual PHP data structure, URL parameter passing is out. The page that's doing the processing is pure PHP without any HTML output, which then sends it's result to another page (conditionally). In that case, hidden form field passing also is out. What's the difference between cookies and sessions? Coming from a Java Servlet background, I've been led to believe that cookies are just what's used to keep track of sessions.[quote]you can also post it from page to page...[/quote]I am not quite sure what you mean. When I have my processing page redirect to my presentation page, I thought all data stored in $_POST is lost? 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.