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 thought this would be pretty straightforward, but it's not working...
I want to change the value of a session variable ONLY if the link is clicked on, however php seems to be executing every <? , so my variable is always the value of the last one on the page (eg. in the code below it is always "test2".
you can't modify a session from the client-side only the server-side, as your evidence shows. You'll have to do something on the recieving page with the session.