Jump to content

echo


onthespot

Recommended Posts

if ($_GET[type] == "") {
$leagues = mysql_query("SELECT `user` , `team` , `home_games_played` ,`home_wins` ,`home_draws` ,`home_losses` , `home_points` , `home_goals_for` , `home_goals_against` , `away_games_played` , `away_wins` ,`away_draws` ,`away_losses` , `away_points` , `away_goals_for` , `away_goals_against` , `home_games_played` + `away_games_played` , `home_goals_for` + `away_goals_for` , `home_goals_against` + `away_goals_against` ,(`home_goals_for` + `away_goals_for`) - (`home_goals_against` + `away_goals_against`) , `home_points` + `away_points`
FROM `$_GET[comp]` ORDER BY `home_points` + `away_points` DESC, (`home_goals_for` + `away_goals_for`) - (`home_goals_against` + `away_goals_against`) DESC, `home_goals_for` + `away_goals_for` DESC");
echo "<h1 class=\"pagetitle\">$info[2] Combined Table</h1>";

echo"<table cellspacing=\"3\" cellpadding=\"10\" style='border: 1px dotted;' bgcolor=\"#eeeeee\">
<tr >
<th style='border-bottom: 1px dotted;'>#</th>
<th style='border-bottom: 1px dotted;' width=\"250\">User</th>
<th style='border-bottom: 1px dotted;'>Played</th>
<th style='border-bottom: 1px dotted;'>Wins</th>
<th style='border-bottom: 1px dotted;'>Draws</th>
<th style='border-bottom: 1px dotted;'>Losses</th>
<th style='border-bottom: 1px dotted;'>GF</th>
<th style='border-bottom: 1px dotted;'>GA</th>
<th style='border-bottom: 1px dotted;'>GD</th>
<th style='border-bottom: 1px dotted;'>Points</th>

</tr>";

while( $row = mysql_fetch_assoc($leagues)) {
extract($row);
$info = explode("_",$row[comp_name]);
$TotalGP = $home_games_played + $away_games_played ;
$TotalW = $home_wins + $away_wins ;
$TotalD = $home_draws + $away_draws ;
$TotalL = $home_losses + $away_losses ;
$TotalGF = $home_goals_for + $away_goals_for ; 
$TotalGA = $home_goals_against + $away_goals_against ;
$TotalPts = $home_points + $away_points ; 
$TotalGD = $TotalGF - $TotalGA;


echo"
<tr>
<td>$p</td>
<td>$user ($team)</td>
<td>$TotalGP</td>
<td>$TotalW</td>
<td>$TotalD</td>
<td>$TotalL</td>
<td>$TotalGF</td>
<td>$TotalGA</td>
<td>$TotalGD</td>
<td>$TotalPts</td>
</tr>";
$p++;
}
echo "</table>";
}

 

Any ideas why the cellpadding wont work?

Link to comment
https://forums.phpfreaks.com/topic/166999-echo/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.