I have an array and i need to display all values, so i used a foreach loop.
I need that when the user click on the button " READ " the value passed to oldvisit.php
is the value of that row, i tried with SESSION but the value passed is the last of the Array.
Of course the values displayed in the page is the right value, but how can i take it and send to oldvisit.php
?
I cant use the form method, because these lines of code, are still inside a Form.
I cant find a solution from days!
<?php
foreach($Visits as $x => $x_value) {
$_SESSION['data'] = $x;
echo "<li><center>". $x . " <input type='button' value='READ' onclick='window.location.href=\"oldvisit.php\" '></li>";
}
?>