f I am calling an undistinguishable amount of records from a database through a while loop, and with each record called a submit button is accompanied with it, how can I get each submit button to respond exclusively to its respective iterated record?
Imagine there is a list displaying X amount of user profiles with each profile having a ‘Contact’ button at the bottom of the frame of each profile. If I click the ‘Contact’ button for a given profile displayed on the list, the name associated with profile with which the button was pressed is given a session variable to be used in the next page, being the contact message.
The issue I am struggling to troubleshoot is: when the ‘Contact’ button is pressed for any given profile, the name of the last profile is stored into the session variable. What I need instead,is that when the ‘Contact’ button of a given profile is pressed, I would like the name corresponding with the profile in question to be stored into the session variable.
Here is the code I am stuck with:
list.php:
[php]
"; echo "
"; echo "
"; echo "