I need to able to click on list element and depending on which I am clicking, 2 variables will be displayed on the same page.
I have 2 variables which are defined in the html code ( this could be changed as I am hardcoding them variables into the html ):
<ul>
<li><a href="#" onclick="('6','67')">Text 1</a></li>
<li><a href="#" onclick="('22','240')">Text 2</a></li>
<li><a href="#" onclick="('34','56')">Text 3</a></li>
</ul>
Later I would like to pick up both variables with PHP $_POST like this:
<?php
echo $_POST['var1'];
echo $_POST['var2'];
?>
How can I achieve that?