I have got a table from which i need to get a piece of equipment:
DROP TABLE IF EXISTS `equipment`;
CREATE TABLE IF NOT EXISTS `equipment` (
`equipmentID` int(11) NOT NULL auto_increment,
`Description` varchar(255) NOT NULL,
`DateEntered` timestamp NOT NULL default CURRENT_TIMESTAMP,
PRIMARY KEY (`equipmentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=20 ;
How would place all of the equipment into a form in my php webpage so the user can choose any piece of equipment they want (more than 1) but also have a counter next to each item to so the user can say how many of each item they require?
Kind of like this:
items quantity(determined by user)
item 1 - 2
item 2 - 3
item 3 - 1
the equipment table looks fine to me, but as you said user choose this seems you have requirement like user ordering form for the items.
these means you should have another table for store purchase details for example. user_order_table which should have fields like [ORDER ID][Item ID] [Item count] etc.. i know its may not the right structure but just to make it clear the thing how you can store this item count for particular client request.
is this the answer of question?
you can use checkboxes like this :
<form>
<input type="checkbox" name="vehicle" value="Bike" />
<input type="checkbox" name="vehicle" value="Car" />
</form>
and when you submit or click a button you can retrieve the number of items that are checked and send them to anywhere you need to process.