Hello everyone! :) Could you please help me? I am still a noob and I'm having a hard time about displaying selected values from mysql database into popup window? This is my code where user can see the table of the electoral officials:
-----CUT-----
<div id="page">
<div id="blanket" style="display:none;"></div>
<div id="popUpDiv" style="display:none;">
<a href="#" name="bio" onclick="popup('popUpDiv')">Close</a>
</div>
<?php
include('voting_connect.php');
{
$result = mysql_query("SELECT * FROM candidates WHERE c_position='Secretary'")
or die(mysql_error());
echo "<center><table id='tables' class='sortable'>";
echo "<tr><th>Secretary:</th></tr>";
while($row = mysql_fetch_array( $result )) {
echo "<tr>";
$row['c_ID'];
echo '<td>' . $row['c_fname'] . ' ' . $row['c_lname'] .'</td>';
echo '<td><a href="cand.php?ID=' . $row['c_ID'] .'" name="bio" onclick="popup("popUpDiv")">View Profile</a></td>';
echo"</tr>";
}
echo"</table></center>";
}
?>
-----CUT-----
What I want to do is when the user clicks on the "View Profile", a pop up window opens with the information of the selected candidate that stored in the content field of the database. Do you have any idea? I hope you can help me with this. Any help would be greatly appreciated.