I am showing a html table which is retrieving the data from mysql using php,the table has a column feedback, the elements in this column are hyperlinked, they direct you to program called feedback.php where a feedback form is there with candidate name and id retrieved from database and shown there , below is the code showing the data displayed on table page
echo " <header class='w3-container w3-black'>
<h1>TABLE Of Faculty Position Applicants :-</h1>
</header>
<form action = '' method = 'post'>
<table class ='w3-table w3-striped w3-border'>
<tr class ='w3-grey'>
<th>Candidate No </th><th>Candidate Name</th><th>Google Scholar</th><th>DBLP</th><th>CV</th><th>Feedback</th>
</tr>";
while($row = mysqli_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['candidate_no'] . "</td>";
echo "<td>" . $row['candidate_name'] . "</td>";
echo "<td><a href=" . $row['gs_link'] . " target='_blank'>Google Scholar</a></td>";
echo "<td><a href=" . $row['dblp_link'] . " target='_blank'>DBLP link</a></td>";
echo "<td><a href=" . $row['cv_link'] . " target='_blank'>CV</a></td>";
echo "<td><a href=" . $row['feedback_link'] ." id = ".$row[id]. " target='_blank'>Feedback</a></td>";
echo "</tr>";
}
echo "</table>";
echo "</form>";
now you can see this line :-
echo "<td><a href=" . $row['feedback_link'] ." id = ".$row[id]. " target='_blank'>Feedback</a></td>";
which I am using to pass the id to feedback.php
on feedback.php this query is written which requires id and retrieved id of the specific candidate using id which is passed to this page
$query="SELECT candidate_name FROM faculty WHERE id=$_POST[id]";
$query2="SELECT candidate_no FROM faculty WHERE id=$_POST[id]";
$result = mysqli_query($conn,$query);
$result1 = mysqli_query($conn,$query2);
$row= mysqli_fetch_assoc($result);
$row2= mysqli_fetch_assoc($result1);
$conn->close();
I want to know the way to pass id to feedback.php so that I can retrieve candidate name and id on that program and show it in form which I will display because in above program I am doing some mistakes or is using wrong way to pass the id to feedback.php , please help me if there is problem I will clarify , help me.