cyrilsnodgrass Posted April 16, 2007 Share Posted April 16, 2007 Hi Folks, I have a shopping cart built using a session cookie approach. It has a shopcart associative array with a key value representing the item and a value representing the qty ordered. I can add and display the items and qtys perfectly. However, the cart page is built using an outer and inner form. That is the outer form takes care of displaying the cart contents and has a submit button that initiates my check out page. The inner form has SUBMIT buttons against each product to allow the deletion of an item. The action page for the inner form is the same page - i.e. it calls itself. There are appropriately named hidden fields containing the product ids. When I click the deletion button, it is always the last product in the cart that is returned in the named field - regardless of which remove button I click. I display all of the items and can see in my named input fields that all of the fields are properly populated....... Link to comment https://forums.phpfreaks.com/topic/47219-_post-issues/ Share on other sites More sharing options...
o3d Posted April 16, 2007 Share Posted April 16, 2007 You haven't posted the code but my guess is that you use nested forms. That will confuse the browser and cause problems. "...A form may contain all markup (both text and body level tags), but it may not have a nested form. ..." http://htmlhelp.com/reference/wilbur/block/form.html Link to comment https://forums.phpfreaks.com/topic/47219-_post-issues/#findComment-230263 Share on other sites More sharing options...
cyrilsnodgrass Posted April 16, 2007 Author Share Posted April 16, 2007 it is indeed a nested form......I take it that everyone thinks this is taboo then ? Link to comment https://forums.phpfreaks.com/topic/47219-_post-issues/#findComment-230278 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.