Reply
table problems
Old 04-11-2007, 04:22 PM table problems
FutileSoul's Avatar
Ultra Talker

Posts: 381
Location: Michigan
SOLVED

i cant get my tables to display properly, can anyone see the problem

the site: http://csr.awardspace.com/league.php

phpmyadmin screenshot: attached

the code:

Code:
// Get all the data from the "aleague" table
$result = mysql_query("SELECT * FROM aleague ORDER BY total DESC") 
or die(mysql_error());  

echo "<table border='1'>";
echo "<tr> <th>Name</th> <th>1</th> <th>2</th> <th>3</th> <th>4</th> <th>5</th> <th>Total</th> </tr>";
// keeps getting the next row until there are no more to get
while($row = mysql_fetch_array( $result )) {
	// Print out the contents of each row into a table
	echo "<tr><td>"; 
	echo $row['name'];
	echo "</td><td>"; 
	echo $row['game1'];
	echo "</td></tr>"; 
	echo $row['game2'];
	echo "</td></tr>";  
	echo $row['game3'];
	echo "</td></tr>";  
	echo $row['game4'];
	echo "</td></tr>";  
	echo $row['game5'];
	echo "</td></tr>";  
	echo $row['total'];
	echo "</td></tr>";  
} 

echo "</table>";
?>
Attached Images
File Type: gif phpmyadmin.GIF (48.2 KB, 6 views)
__________________
Mangregation - The Congregation of Man

Last edited by FutileSoul : 04-11-2007 at 04:38 PM.
FutileSoul is offline
Reply With Quote
View Public Profile Visit FutileSoul's homepage!
 
When You Register, These Ads Go Away!
Old 04-11-2007, 04:31 PM Re: table problems
chrishirst's Avatar
Super Moderator

Posts: 13,486
Location: Blackpool. UK
PHP problem really but you have your <td>s messed up

there is a lot of closing </td>and </tr>s without any opening ones
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-11-2007, 04:38 PM Re: table problems
FutileSoul's Avatar
Ultra Talker

Posts: 381
Location: Michigan
thanks its fixed now
__________________
Mangregation - The Congregation of Man
FutileSoul is offline
Reply With Quote
View Public Profile Visit FutileSoul's homepage!
 
Reply     « Reply to table problems
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12931 seconds with 13 queries