I am somewhat a noob on php, yet I have been trying for ages to solve this problem:
I have a MySQL ARRAY from which I want to extract data to put in a SESSION via a link. That should be pretty simple, but I’m going crazy trying to find the solution.
Here is what I’m trying to do:
ARRAY output:
Name – Country
James – Germany (link)
George – Mexico (link)
Tom – France (link)
Peter – Ireland (link)
On the end of each ARRAY output I want a link. And when the link is pressed the specific VARIABLE is sent to the SESSION and the user is also sent to a new page, where the SESSION will be picked up again.
The only VARIABLE I can manage to sent to the SESSION is always the last one, ex. “Peter – Ireland”, Even if I press on the link next to ex. George. Frustrating!!
What to do?