| View previous topic :: View next topic |
| Author |
Message |
beidlerj
Joined: 10 Feb 2006 Posts: 55 Location: Oregon, USA
|
Posted: Tue Apr 11, 2006 1:11 am Post subject: Pass objects as HTML form variables? |
|
|
I don't suppose it's possible to pass a PHP object as an HTML form variable, is it? I wouldn't think so, but thought I'd check with those who can code circles around me.
I have one page which queries a DB and gets an object back. I do this on Page A just to see if there are any records returned. If there are, I show a button that says "View Summaries". When clicked, the user is taken to Page B via an HTML form with some hidden variables. I thought it might be nice to just pass along the objects rather than re-doing the query on the second page. |
|
| Back to top |
|
 |
cweiske
Joined: 08 Dec 2005 Posts: 454 Location: Leipzig/Germany
|
Posted: Tue Apr 11, 2006 6:30 am Post subject: |
|
|
| Magic word is "Session variables" here |
|
| Back to top |
|
 |
inspight
Joined: 08 Feb 2006 Posts: 4
|
Posted: Tue Apr 11, 2006 6:37 am Post subject: serialize |
|
|
| I think you can do it if you serialize() and unserialize() the object but Session is the way to go |
|
| Back to top |
|
 |
|