Probably a noob question, but one learns by asking.
I am trying to set up a table to load and display data from my database. I have gotten everything to work except the final column. I want the final column to be a link that says "view images" and when you click it, it opens up a fancybox JS.
Here's my source code:
<script>
$(document).ready(function() {
$(".fancybox-thumb").fancybox({
prevEffect : 'none',
nextEffect : 'none',
helpers : {
title : {
type: 'outside'
},
thumbs : {
width : 50,
height : 50
}
}
});
});
</script>
<?php
mysql_select_db("premiumguns") or die(mysql_error());
echo "<table id='myTable' class='info' width='100%' border='0' cellspacing='0' cellpadding='0'>";
echo "<thead><tr> <th>Serial</th> <th>Make</th> <th>Model</th> <th>Gauge</th> <th>Barrel</th> <th>Details</th></tr></thead><tbody>";
// keeps getting the next row until there are no more to get
while($row = mysql_fetch_array( $result )) {
// Print out the contents of each row into a table
echo "<tr><td height=\"20px\">";
echo $row['Serial_No'];
echo "</td><td>";
echo $row['Make'];
echo "</td><td>";
echo $row['Model'];
echo "</td><td>";
echo $row['Gauge'];
echo "</td><td>";
echo $row['Barrel_Length'];
echo "</td><td>";
echo "<a class = "fancybox-thumb" rel="gallery1" href="wp-content/prem_pics/C16719B/C16719B-01.jpg">View Pictures</a>"
echo "</td></tr>";
}
echo "</tbody></table>";
?>
</body>
any help would be greatly appreciated