I have multiple buttons on a single page. I need when I click a button that the same page reloads, but a counter and name of button clicked be updated. And as many times I do that, the list of clicked buttons and name of buttons should be maintained. Something like a visitor of site concept and counter.
e.g.
Button1 (value “Milk”)
Button2 (value “Cereals”)
etc…
Now pressing any of the buttons above will be like:
List:
Item1: Button 1 – value of button
item2: …. etc
I will have then a submit button that once am done with adding the items I need to list, I click and go to review what I selected…
Any idea how this can be done via php only without JS?
Thanks, and sorry if not so clear but I tried my best
You can create a form that submits to itself, in conjunction with sessions that retain the data for as long as you want it.