i have this problem on getting a specific data in my list table. basically, i have a table named orglist which has 8 columns (org no, orgname, orgcode, subject area, date created, year, semester and managerID)
in my page, i have this php code where i execute the data into a list. heres my code:
$query = "SELECT * FROM orglist WHERE managerID = '$managerID';";
$result = mysqli_query($conn, $query);
$check = mysqli_num_rows($result);
echo "<div class='page-header'>
<h2>My Organizations</h2>
</div>
<div class='container col-md-6'>
<div class='list-group'>";
if($check > 0){
while ($row = mysqli_fetch_array($result)) {
$orgname = $row['orgName'];
echo " <a class='list-group-item' href='viewActiveOrg.php'> " . $orgname . "</a>";
}
echo "</div></div>";
so after it executes, it displays a list of anchor tags/links that a manager can click. If a manager clicks one of the links, the active page should bring the manager to another page and should show information about the link that the manager clicked. I am thinking after I select the datas and put into list, I should create a session, but the problem is if table orglist has many rows, how can i specifically get the row's data (name and orgcode) that was clicked by the manager?
thank you for answering.