Re: Submit Using An Image Form Processing
| From: | tedd | Date: | Sun, 19 Jun 2011 12:35:12 +0000 |
| Subject: | Re: Submit Using An Image Form Processing | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-313609@lists.php.net to get a copy of this message | ||
At 11:54 AM -0400 6/18/11, Ron Piggott wrote:
I am writing a shopping cart using the PayPal API. Shopping cart works. Just adding additional functionality.Ron: You don't need to pass a value. What you need is simply a trigger to do something. As such, you can use lot's of things. In this case, a button should work. http://www.htmlcodetutorial.com/forms/_BUTTON.html However, I would take all the styling (including dimensions) out of it and place those in a css sheet. Also, what's wrong with a hidden field? Cheers, tedd -- ------- http://sperling.com/From the shopping cart contents I am trying to make it so the user may click on a picture of a trash can to delete the item. I wrote the following line of code:<INPUT TYPE="image" SRC="http://www.theverseoftheday.info/store-images/trash_can.png" WIDTH="20" HEIGHT="20" style="float: right;boarder: 0;" alt="Remove Product From Shopping Cart" name="remove_product" value="1" /> But when I have do: echo $remove_product; I am not getting anything. Is there a correct way of passing a variable through an image? The value in this above example is the auto_increment value of the product. From this I could remove the item from the shopping cart. OR Is there a better way to pass a variable through a graphic? I am hoping for the shopping cart contents to be just 1 form where users will have several options (change quantities, delete specific items). I can't use a hidden field. Thank you for your help. Ron