PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have some text that calls a function when clicked. The function updates a value in an array. A number on the page then needs to be changed to reflect this new value. How do I refresh the page without resetting all the values of the array? Here is a sample of what is happening
Do a View Source in your browser for the page this code is in. When the Add or Remove links are clicked, the action will be exactly what is in the HTML code in the View Source. Since PHP is a server-side language, no PHP code will be run unless the page is reloaded.
You would need to use Javascript to make a page interactive in the way you describe. There's a good treatment of this topic in one of the sticky-posts in this forum.