hello I wanted to change the value of a php variable when a user clicks on an anchor <a href....></a> Does anyone knows how to do this without using javascript? Thanks in advance
PHP 'lives' on the server. Therefor you just submit the page and get the value from the URL:
<a href="page.php?variable=value">link</a>
In your page:
$variable = $_GET['value'];
leatherback wrote:PHP 'lives' on the server. Therefor you just submit the page and get the value from the URL: <a href="page.php?variable=value">link</a> In your page: $variable = $_GET['value'];
Thanks, it was a straightforward and effective reply.
Don't forget to mark this thread resolved.