I am trying to create a PHP code for restaurants -
I need the check boxes on the UI to allow for options
for example the title would be "select up to three toppings"
and there would be a list of checkboxes and the User can only check three

also, same check-boxes, but now unlimited from a list (like building a pizza)
the toppings are the list with the check boxes next to each Subitem (toppings)
and the price needs to be added as well

I'm not going to write the code for you but let me suggest that it is simple enough to generate a series of check boxes with appropriate labels in a while loop based on your input / database / table or wherever you are keeping the details of the options that are available. You will want to make the names of the check boxes follow a pattern such as option_1, option_2, option_3 and so forth. That makes it relatively easy to find out what was entered in the module that will be the "action" for your form.

Your turn. You need to take a crack at the code and then if you have a problem, post some code and define the problem.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.