Hi,
I semi newbie here. I have tried to use the following code to display my results however when I view my PHP page it does not show anything getting returned from my mySQL tables. Can anybody assist? Many thanks for in advance for any assistance you can provide.
<?php
$db_handle = mysql_connect("localhost","root","") or die(mysql_error());
mysql_select_db("spl",$db_handle);
?>
<TABLE width="300" cellpadding="1" cellspacing="1">
<?
$myquery = mysql_query("SELECT NumberGoals, PlayerName, TeamName FROM scorers ORDER BY Position",$db_handle);
?>
<tr>
<td width="50" class="EventTitle" valign="top" align="center"><img border="0" src="photos/goals.gif"></td>
<td width="200" class="EventTitle" valign="top" align="center"><img border="0" src="photos/name.gif"></td>
<td width="200" class="EventTitle" valign="top" align="center"><img border="0" src="photos/team.gif"></td>
</tr>
<?
while($rs = mysql_fetch_array($myquery)){
if($BGColor == "#D9D9F3"){
$BGColor="#F8F8FF" ;
} else {
$BGColor="#D9D9F3";
}
?>
<div ALIGN="center">
<tr BGColor="<?echo ($BGColor);?>">
<td class="description" valign="top" align="center"><?=$rs["NumberGoals"]; ?></td>
<td class="description" valign="top" align="center"><?=$rs["PlayerName"]; ?></td>
<td class="description" valign="top" align="center"><?=$rs["TeamName"]; ?></td>
</tr>
<? } ?>
</table>