I am working on HTML/PHP table that generates multiple hyperlinks to the same page. The difference is depending on which link is clicked the session variable is set on that. However it always returns the link for the last hyperlink created. Is there a way to set the variable based on which hyper link is used. The data used is pulled from a sql server. It is echoing the correct result for each row on what the session variable should be. Sample code, $x is the array i am pulling from:
<?php
if($x[$i] != ""){
?>
<a href="file.php" onClick="<?php $_SESSION['test'] = $x[$i]?>; return popup(this, 'notes')" . SID . >To page</a>
<?php
echo $_SESSION['test'];
}
$i++;
//$_SESSION['test'] = $email;
?>