Hi Guys,
This is probably the most silliest of questions, i am still learning php and mysql :-| .
I have this code below which brings up data from the database and displays it, what i want to do is to give the table headers a bgcolor how do i insert it, i get a parse error when i try to introduce a bgcolor..
Can anyone help.
<table border="1" bordercolor="black" cellpadding="2" cellspacing="0" width="550">
{php}
$db_username=;
$db_password=;
$db_name=;
mysql_connect($db_connect,$db_username,$db_password);
mysql_select_db($db_name);
$record_set=mysql_query("SELECT * FROM dDdDdD");
for($c=0; $c<mysql_num_fields($record_set);$c++){
print "<th>".mysql_field_name($record_set,$c)."</th>";
}
while($record=mysql_fetch_row($record_set)){
print "<tr>";
for($c=0; $c<mysql_num_fields($record_set);$c++){
print "<td>".$record[$c]."</td>";
}
print "</tr>";
}
{/php}
</table>