I am using PHP to write the graphical output of a shopping basket and have multiple submit buttons (using <input type="image" value="...>) to increase/reduce the entry or remove it altogether. I would have liked to use the value attribute set to the number of the record in the basket to determine from which entry in the basket the submit has been sent so that I can deal solely with that entry. However, IE does not send this data, only the X & Y co-ordinates of the click, although Firefox does.
The solutions I have though of so far are:
- Use a different form for each record but this makes it difficult to use a table to line up all the items and their prices in columns.
- Have the name of each record's button appended with the number of the record. Loop around the records to detect which name has has a co-ordinate sent to it and extract the number from the name.
Has anyone else had to solve this problem? Any thoughts?
Andy