I want the columns to have titles (member name, address, etc...)
Also on the far right side of the table I would like to a an image that is a link for “edit” “view” and “delete” I have the code to do the action just don’t know how to get the image in the table?
Last item that is only for looks, what is the best way to get each row to be a different background color?
Code: Select all
<?php
// Connecting, selecting database
// left blank
// set the date for future use
$today = date("j-n-Y");
echo '<p> </p>';
// Performing SQL query
$query = 'SELECT pn_name, pn_uname, pn_phone, pn_duesexdate, barc_id FROM _users WHERE pn_duesexdate > 100 ORDER BY pn_name ASC, barc_id ASC';
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
// Printing results in HTML
echo "<table width=\"100%\" border=\"1\" cellspacing=\"0\" cellpadding=\"3\"><caption><b>Members, $today</b></caption>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo "\t<tr>\n";
foreach ($line as $col_value) {
echo "\t\t<td>$col_value</td>\n";
}
echo "\t</tr>\n";
}
echo "</table>\n";
// Free resultset
mysql_free_result($result);
// Closing connection
mysql_close($link);
?>Thanks,
Me