Keepaitulteme
New Member
Im a newbie to php and sql. Im trying to insert data from a back end sql database into a html table in a php file and the display a link or onclick event via css to display the 'Details' column. So I have managed to get as far as displaying the data into a html table embeded within the php code, I have also managed to get the onclick event working to display more details but when you click on it it only displays the details from the first row of data within the sql query. Im not sure if Ive been clear but I have added the code for the particular section of the php file below. Any help would be appreciated.RajPHP File\[code\]$result = mysql_query("SELECT * FROM Year2012 WHERE Featured = 1");echo "<table border='1'><tr><th>A</th><th>B</th><th>C</th></tr>";while ($row = mysql_fetch_array($result)) { echo "<tr class='notfirst'>"; echo "<td>" . $row['A'] . "</td>"; echo "<td>" . $row['B'] . "</td>"; echo "<td> <input type='checkbox' id='linkie' class='popUpControl'> <label for='linkie' class='link'> <span>More...</span> <span class='box'> <span class='title'>Event Details</span> <span class='copy'>".$row['C']."</span> </span> </label></td>"; echo "</tr>"; }echo "</table>";mysql_close($con);\[/code\]