Jump to content

$_POST Issues


cyrilsnodgrass

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.