Hi guys.
I have the following function, which extracts data from mysql and puts it in an html table.
[php]function getPosts(){
$query = mysql_query(“SELECT * FROM myPosts”) or die(mysql_error());
if(mysql_num_rows($query)==0){
echo'<tr><td colspan="\3\">NO POSTS FOUND!</td></tr>';
} else {
while($posts = mysql_fetch_assoc($query)){
echo ';
echo "<tr><td>".$posts['title']."</td> <td>".$posts['author'] . "</td> <td>".$posts['linklabel'] . "</td> <td> <a href=\"delete.php?id=".$posts['id']."\">Delete</a> <a href=\"editPosts.php?id=".$posts['id']."\"> Edit </a></td>";
}[/php]
I am trying to highlight to the first row of the table, i.e, the header, which is called “title”. Ideally, I would like to high like every other row with a different color as well, but at this point I am interested in highlighting the html header
I am trying to achieve the same effect as Tables # 1, and/or 2-3 in this link http://www.textfixer.com/resources/css-tables.php