+ 1

increasing php variable value on button click

i am trying to increment php variable value through button click. it works only once on button click. how to repeat ? https://code.sololearn.com/wEKFn8yzYOqA/?ref=app

2nd Apr 2019, 10:59 AM
muhammed rizwan
muhammed rizwan - avatar
2 Réponses
+ 12
It doesn't work like that. Use only Javascript for this purpose. Create and use a Javascript variable.
3rd Apr 2019, 10:15 PM
Igor Makarsky
Igor Makarsky - avatar
0
But how . If i use javascript , i wont be able to update the php variable . This actually is to build a quiz page . When i click next , I want to increase $id value and get data from data from that id .
4th Apr 2019, 5:49 PM
muhammed rizwan
muhammed rizwan - avatar