I am creating a custom ordering site built using Wordpress. I've created an object-oriented plugin to store all the order details. (product specs, contact information, various options, etc) The ordering process spans three pages. What is the best way for me to pass the object from one page to the next that is the most widely browser friendly? JSON encoding? Serialization? $_SESSION variable? Wordpress does not allow this natively, but I found instructions on how to override this.
Any suggestions would be greatly appreciated!
I would recommend storing data in different indexes of $_SESSION
, so the information will remain persistent across pages.
Because you aren't implementing a feature like search, $_SESSION
is good choice because users may switch between ordering products and visiting other pages on your site. Additionally, this method does not depend on browser features.