<!--images acting as buttons-->
<form>
<img src="tree_nuts.jpg" class="qac left" onclick="qac_search()" name="Tree Nuts">
<img src="gluten.jpg" class="qac" onclick="qac_search()" name="Gluten">
</form>
<!--function-->
<script>
function qac_search(){
<?php $_SESSION['variable'] = //name of which image i clicked on;?>
window.open("trial.php");
}
</script>
Here is my code. 2 buttons which, once clicked on, activate the function below in the code.
My aim is to make the $_SESSION['variable']
store the name of which image was clicked on (e.g.Tree Nuts or Gluten).
How do I do this?