I’m not sure if this is a php, html, or PayPal question so if I’m in the wrong place, I apologize!
I’m creating some simple, basic ecommerce on our website. The first is a page for membership applications and renewals. The user fills out a form, clicks “submit” and is taken to a “process” page which opens a SESSION and assigns all of the $_POST variables to $_SESSION variables. The user reviews the data they submitted then clicks on PayPal’s “Buy Now” button, goes to PayPal and pays. PayPal “Returns” the user to our return page that says “thanks, blah, blah…” and the php sends an email to the membership chairman with the membership application data. This works great. I use SESSION so that all of the form data the user submitted is still there when PayPal returns them to our site. Next is the problem page. . .
The second page is an event registration page (independent of the membership page.) Following the same concepts above, the user fills out their form, clicks on “submit” and goes to a “process” page that does the SESSION variable assignment thing. This page has 4 items the user can buy (starting with the event registration fee) and uses PayPal’s basic shopping cart via “add to cart” buttons The user then clicks one of the 4 “add to cart” buttons, goes to PayPal, selects quantity, then clicks “continue shopping” (if that’s what they want to do.) PayPal returns them to our “process” page (rather than a “return” page) so that they can select another item, but all of the session variables are now empty! So, is SESSION not the way to do this? Or is there something else I need to do to make the SESSION variables stick? Or should I do this entirely differently? The idea is they return to the process page to add more items to their cart before checking out and paying on PayPal.
Thanks!