Imtehbegginer Posted October 26, 2006 Share Posted October 26, 2006 Here is my code[code]<HTML><HEAD><TITLE><?php include 'config.php';echo $config['servname'];?></TITLE> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <LINK REL="stylesheet" HREF="styles/style.css" TYPE="text/css"><style type="text/css"><!--.style1 {color: #999999}--></style></HEAD><BODY BGCOLOR="323232" TEXT="#000000" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0"><TABLE WIDTH="10%" BORDER="0" CELLSPACING="0" CELLPADDING="0" ALIGN="CENTER"><TR><TD><IMG SRC="images/interface_01.gif" WIDTH="800" HEIGHT="110"></TD></TR><TR><TD><TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0"><TR><TD BGCOLOR="494E52" WIDTH="4%" BACKGROUND="images/interface_11.gif" VALIGN="TOP"><TABLE WIDTH="0%" BORDER="0" CELLSPACING="0" CELLPADDING="0"><TR><TD><IMG SRC="images/interface_02.gif" WIDTH="163" HEIGHT="20"></TD></TR><TR><TD BACKGROUND="images/interface_05.gif"><TABLE WIDTH="81%" BORDER="0" CELLSPACING="0" CELLPADDING="0" ALIGN="RIGHT"><TR> <TD CLASS="text1"><A HREF="index.php">Home</A></TD></TR><TR> <TD CLASS="text1"><A HREF="<?php include 'config.php'; echo $config['forum'];?>">Forums</A></TD></TR><TR> <TD CLASS="text1"><A HREF="rankings.php">Rankings</A></TD></TR><TR> <TD CLASS="text1"><A HREF="download.php" target="_self">Downloads</A></TD></TR><TR> <TD CLASS="text1"><A HREF="stats.php">Statistics</A></TD></TR></TABLE></TD></TR><TR><TD><IMG SRC="images/interface_06.gif" WIDTH="163" HEIGHT="22"></TD></TR><TR><TD BACKGROUND="images/interface_07.gif"> </TD></TR><TR><TD><IMG SRC="images/interface_08.gif" WIDTH="163" HEIGHT="28"></TD></TR><TR><TD BACKGROUND="images/interface_09.gif"><TABLE WIDTH="81%" BORDER="0" CELLSPACING="0" CELLPADDING="0" ALIGN="RIGHT"><TR> <TD CLASS="text1"><A HREF="usercp.php">Members Area </A></TD></TR><TR> <TD CLASS="text1"><A HREF="admincp.php">Admin Area </A></TD></TR><TR> <TD CLASS="text1"><A HREF="register.php">Register</A></TD></TR><TR> <TD CLASS="text1"><A HREF="cpass.php">Change Password </A></TD></TR><TR> <TD CLASS="text1"><A HREF="rpass.php">Recover Password </A></TD></TR></TABLE></TD></TR><TR><TD BACKGROUND="images/interface_09.gif"><IMG SRC="images/interface_10.gif" WIDTH="163" HEIGHT="20"></TD></TR><TR><TD BACKGROUND="images/interface_11.gif"> </TD></TR></TABLE></TD><TD WIDTH="89%" BGCOLOR="494E52" VALIGN="TOP"><DIV ALIGN="CENTER"><SPAN CLASS="pagehead"> <BR> HOME</SPAN><BR><BR></DIV><TABLE CELLPADDING="1" CELLSPACING="0" BORDER="0" BGCOLOR="#000000" WIDTH="266" HEIGHT="25" ALIGN="CENTER"> <TR> <TD WIDTH="264"><TABLE CELLPADDING="1" CELLSPACING="0" BORDER="0" BGCOLOR="7E9AB8" WIDTH="159" HEIGHT="25"> <TR> <TD WIDTH="157" BGCOLOR="737C83"> <TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0" BGCOLOR="#ffffff" WIDTH="391"> <TR> <TD HEIGHT="45" BGCOLOR="5C6368"><DIV ALIGN="CENTER"><BR><TABLE WIDTH="94%" BORDER="0" CELLSPACING="0" CELLPADDING="0"><TR> <TD CLASS="news"><p>Server Rankings </p> </TD></TR><TR> <TD CLASS="pagehead"> <table width="302" height="115" border="0" align="center" class="text1"> <tr> <td width="80"><span class="style1">Name</span></td> <td width="64"><span class="style1">Level</span></td> <td width="51"><span class="style1">Zuly</span></td> <td width="79"><span class="style1">Class</span></td> </tr> <tr> <td height="29"><?php include 'config.php';$result = mysql_query("SELECT level, char_name, zuly, classid FROM characters ORDER BY level DESC") or die(mysql_error()); // keeps getting the next row until there are no more to getwhile($row = mysql_fetch_array( $result )) { // Print out the contents of each row into a table echo $row['char_name']; include ('modules/class.php'); echo "</td></tr>"; } ?> </td> <td> </td> <td><?php include 'config.php';$result = mysql_query("SELECT level, char_name, zuly, classid FROM characters ORDER BY level DESC") or die(mysql_error()); // keeps getting the next row until there are no more to getwhile($row = mysql_fetch_array( $result )) { // Print out the contents of each row into a table echo $row['level']; include ('modules/class.php'); echo "</td></tr>"; } ?></td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> </tr> </table> <br></TD></TR></TABLE> <BR><BR></DIV></TD></TR> </TABLE></TD></TR> </TABLE></TD></TR> </TABLE><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR></TD><TD WIDTH="7%" BACKGROUND="images/interface_04.gif" VALIGN="TOP"><IMG SRC="images/interface_04.gif" WIDTH="52" HEIGHT="10"></TD></TR></TABLE></TD></TR><TR><TD><img src="images/interface_12.gif" width="800" height="71" border="0" usemap="#Map"> <map name="Map"> <area shape="rect" coords="652,54,769,84" href="http://www.clantemplates.com" target="_blank"> </map> </TD></TR></TABLE></BODY></HTML>[/code]But Im only getting the FIRST row.. how can I get the 2nd, third, fourth and so on? Quote Link to comment Share on other sites More sharing options...
btherl Posted October 27, 2006 Share Posted October 27, 2006 Are you getting only one row, or are you getting the same row printed multiple times? Your loops looks like they should work, assuming class.php does something sensible. Quote Link to comment Share on other sites More sharing options...
redarrow Posted October 27, 2006 Share Posted October 27, 2006 I get the inpression that it's the query and you useing array and not assocTry this ok.[code]<HTML><HEAD><TITLE><?php include 'config.php';echo $config['servname'];?></TITLE> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <LINK REL="stylesheet" HREF="styles/style.css" TYPE="text/css"><style type="text/css"><!--.style1 {color: #999999}--></style></HEAD><BODY BGCOLOR="323232" TEXT="#000000" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0"><TABLE WIDTH="10%" BORDER="0" CELLSPACING="0" CELLPADDING="0" ALIGN="CENTER"><TR><TD><IMG SRC="images/interface_01.gif" WIDTH="800" HEIGHT="110"></TD></TR><TR><TD><TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0"><TR><TD BGCOLOR="494E52" WIDTH="4%" BACKGROUND="images/interface_11.gif" VALIGN="TOP"><TABLE WIDTH="0%" BORDER="0" CELLSPACING="0" CELLPADDING="0"><TR><TD><IMG SRC="images/interface_02.gif" WIDTH="163" HEIGHT="20"></TD></TR><TR><TD BACKGROUND="images/interface_05.gif"><TABLE WIDTH="81%" BORDER="0" CELLSPACING="0" CELLPADDING="0" ALIGN="RIGHT"><TR> <TD CLASS="text1"><A HREF="index.php">Home</A></TD></TR><TR> <TD CLASS="text1"><A HREF="<?php include 'config.php'; echo $config['forum'];?>">Forums</A></TD></TR><TR> <TD CLASS="text1"><A HREF="rankings.php">Rankings</A></TD></TR><TR> <TD CLASS="text1"><A HREF="download.php" target="_self">Downloads</A></TD></TR><TR> <TD CLASS="text1"><A HREF="stats.php">Statistics</A></TD></TR></TABLE></TD></TR><TR><TD><IMG SRC="images/interface_06.gif" WIDTH="163" HEIGHT="22"></TD></TR><TR><TD BACKGROUND="images/interface_07.gif"> </TD></TR><TR><TD><IMG SRC="images/interface_08.gif" WIDTH="163" HEIGHT="28"></TD></TR><TR><TD BACKGROUND="images/interface_09.gif"><TABLE WIDTH="81%" BORDER="0" CELLSPACING="0" CELLPADDING="0" ALIGN="RIGHT"><TR> <TD CLASS="text1"><A HREF="usercp.php">Members Area </A></TD></TR><TR> <TD CLASS="text1"><A HREF="admincp.php">Admin Area </A></TD></TR><TR> <TD CLASS="text1"><A HREF="register.php">Register</A></TD></TR><TR> <TD CLASS="text1"><A HREF="cpass.php">Change Password </A></TD></TR><TR> <TD CLASS="text1"><A HREF="rpass.php">Recover Password </A></TD></TR></TABLE></TD></TR><TR><TD BACKGROUND="images/interface_09.gif"><IMG SRC="images/interface_10.gif" WIDTH="163" HEIGHT="20"></TD></TR><TR><TD BACKGROUND="images/interface_11.gif"> </TD></TR></TABLE></TD><TD WIDTH="89%" BGCOLOR="494E52" VALIGN="TOP"><DIV ALIGN="CENTER"><SPAN CLASS="pagehead"> <BR> HOME</SPAN><BR><BR></DIV><TABLE CELLPADDING="1" CELLSPACING="0" BORDER="0" BGCOLOR="#000000" WIDTH="266" HEIGHT="25" ALIGN="CENTER"> <TR> <TD WIDTH="264"><TABLE CELLPADDING="1" CELLSPACING="0" BORDER="0" BGCOLOR="7E9AB8" WIDTH="159" HEIGHT="25"> <TR> <TD WIDTH="157" BGCOLOR="737C83"> <TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0" BGCOLOR="#ffffff" WIDTH="391"> <TR> <TD HEIGHT="45" BGCOLOR="5C6368"><DIV ALIGN="CENTER"><BR><TABLE WIDTH="94%" BORDER="0" CELLSPACING="0" CELLPADDING="0"><TR> <TD CLASS="news"><p>Server Rankings </p> </TD></TR><TR> <TD CLASS="pagehead"> <table width="302" height="115" border="0" align="center" class="text1"> <tr> <td width="80"><span class="style1">Name</span></td> <td width="64"><span class="style1">Level</span></td> <td width="51"><span class="style1">Zuly</span></td> <td width="79"><span class="style1">Class</span></td> </tr> <tr> <td height="29"><?php include 'config.php';$result = mysql_query("SELECT characters.level, characters.char_name, characters.zuly, characters.classid FROM characters ORDER BY level DESC") or die(mysql_error()); // keeps getting the next row until there are no more to getwhile($row = mysql_fetch_assoc( $result )) { // Print out the contents of each row into a table echo $row['char_name']; include ('modules/class.php'); echo "</td></tr>"; } ?> </td> <td> </td> <td><?php include 'config.php';$result = mysql_query("SELECT characters.level, characters.char_name, characters.zuly, characters.classid FROM characters ORDER BY level DESC") or die(mysql_error()); // keeps getting the next row until there are no more to getwhile($row = mysql_fetch_assoc( $result )) { // Print out the contents of each row into a table echo $row['level']; include ('modules/class.php'); echo "</td></tr>"; } ?></td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> </tr> </table> <br></TD></TR></TABLE> <BR><BR></DIV></TD></TR> </TABLE></TD></TR> </TABLE></TD></TR> </TABLE><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR></TD><TD WIDTH="7%" BACKGROUND="images/interface_04.gif" VALIGN="TOP"><IMG SRC="images/interface_04.gif" WIDTH="52" HEIGHT="10"></TD></TR></TABLE></TD></TR><TR><TD><img src="images/interface_12.gif" width="800" height="71" border="0" usemap="#Map"> <map name="Map"> <area shape="rect" coords="652,54,769,84" href="http://www.clantemplates.com" target="_blank"> </map> </TD></TR></TABLE></BODY></HTML>[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.