Sunday, 24 September 2017

javascript - How can I edit a PHP variable if i click on a button?

I would like to know how I change a PHP variable if I click on a button. Let's say I have the following webpage:




_______________________________________________
| Menu | A Webpage |
| | |
| - item1 | |
| - item2 | |
| - item3 | Content |
| - item4 | |
| | |
| | |



And if I click on 'item1' the page changes with the data that is related to the user that is linked with that button. So does it with the other items.



This is currently my code:






item1


item2


item3



item4




This is is enough to let a window appear or to hide a division or something. But what I want is if a button is clicked I want to change a PHP variable. Like this:






item1




With this I can easily change the page to what the user wants to see, without the need to make multiple pages. But my question is: 'how can I make this possible'?



I would like to thank you all in advance!

No comments:

Post a Comment

casting - Why wasn't Tobey Maguire in The Amazing Spider-Man? - Movies & TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...