I'm new to PHP, so I'm kind of groping my way around.
Let's say I have a link that says "Log Out". When clicked, I need to unset() a PHP variable:
But the anchor tag and PHP are different "realms". Is the only way to do this to redirect to a PHP page with a query parameter like:
and then unset() the variable? That's the only thing I can think of, but I'd like to know if experienced PHP developers have a more graceful way of doing this without a page reload. Thanks.