sovereign110 Posted October 27, 2010 Share Posted October 27, 2010 I'm just starting to learn PHP and I'm working on something that involves two files, one HTML and another PHP. The HTML file basically accesses the PHP file anyway though, to avoid repetition in the HTML code...the actual HTML form is hardcoded within the PHP file itself. The user will be able to enter the quantity of items they want, and either add them to their shopping cart (display their order back to them on the same page as the order form) or submit the order (display their order back to them without the order form visible). I already have the shopping cart portion done, so I'm really only having problems with two things: 1) If they place their order, how do I redisplay the information without the HTML order form visible and 2) If they already have an order in their shopping cart and they place their order, how do I carry over all the information in the cart to redisplay it (my variables all seem to reset after they add to their cart and display so I can't use the same function I used to retrieve it all in the first place)? Thanks in advance...I've been trying to figure this out for over an hour now and I just need a push in the right direction If you need anything else clarified let me know, I'll be lurking... Quote Link to comment Share on other sites More sharing options...
revraz Posted October 28, 2010 Share Posted October 28, 2010 You can use sessions and/or a database to track your orders. Quote Link to comment Share on other sites More sharing options...
gizmola Posted October 28, 2010 Share Posted October 28, 2010 Without seeing some code, Revraz has offered the same general advice that I would. 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.