0

I am trying to click on a cell in a html table so that I can go to the same webpage and show a second div panel over the darkened original webpage. I have the code to create the darkened page and show a div. I have used the following code for the table:

<?php
$query = "SELECT CONCAT(Firstname, ' ', Lastname), Startyear, Endyear, id FROM pastpresidents ORDER BY Startyear Limit $leftover, $firstpart";
$result = mysqli_query($link, $query);
if ($result){
echo"<table width=\"100%\" border=\"2\" bgcolor=\"#FFFFFF\" cellspacing=\"2\"><font size=\"1\">";
$resultrowcount = $result->num_rows;
while ($row = mysqli_fetch_array($result, MYSQLI_NUM)) {
echo "<tr><td align=\"center\" class=\"stylecm\" width=\"40%\">";
echo "<a href='pastpres.php?id=$row[3]'\">".$row[0]." - ".$row[1]."-".$row[2]."</a></td></tr>";
} //end 1st while
if ($leftover > $midcount){
    //add blankrow
    echo "<tr><td align=\"center\" class=\"style2\" width=\"40%\">--</td></tr>"; 
}
echo '</table>';
}
?>

pastpres.php is the webpage that has the table and I want to go back to that page and activate the Modal box code, and replace the current button.

  • I'm not sure what your question is. Can you please clarify? – Tristan Jul 04 '16 at 01:07
  • Also, you need to read up on this thread first. PHP does not handle clicks http://stackoverflow.com/questions/13840429/what-is-the-difference-between-client-side-and-server-side-programming – Machavity Jul 04 '16 at 01:08

0 Answers0