Nukemods Forum  
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 87
9 members and 78 guests
ass6reetmanageb, carlhodgkinson1, digeoitalpimcf3, howhnw9toplanxo, lawn22ev12, makaa3emoneywit, res7zeptaurants, sacsn9eramentjf, ssefqarchmar2dx
Most users ever online was 611, 03-21-2008 at 11:10 PM.
» .::.
tattoo fonts
http://www.checkoutmyink.com/category/tattoo-fonts-tattoo

Go Back   Nukemods Forum > PHP-Nuke 6.5 to 6.9 > Nuke 6.5 to 6.9 - Blocks

Reply
 
LinkBack Thread Tools Display Modes
Help creating block
Old
  (#1 (permalink))
Junior Member
 
Status: Offline
Posts: 1
Join Date: Jun 2003
Help creating block - 06-14-2003, 05:24 PM

Im trying to create a block that will display a rows in another mysql table.

I put the code in but my site turns all messed up with alignment when i do. I get the feeling im not doing it right.

Code:
<?php
$db = mysql_connect("localhost","*****","******") or die("Problem connecting");
mysql_select_db("ladder") or die("Problem selecting database");
$query = "SELECT * FROM ladder_1 ORDER BY games desc";
$result = mysql_query($query) or die ("Query failed");
$numofrows = 10;
?><?php
echo "<TABLE BORDER=\"1\" font color=\"white\">\n";
echo "<TR bgcolor=\"#003366\"> <TD>Zone Nic</TD><TD>Points</TD></TR>\n";
for($i = 0; $i < $numofrows; $i++) {
    $row = mysql_fetch_array($result); 
    if($i % 2) { 
        echo "<TR bgcolor=\"black\">\n";
    } else { 
        echo "<TR bgcolor=\"black\">\n";
    }
    echo "<TD>".$row['name']."</TD><TD>".$row['games']."</TD>\n";
    echo "</TR>\n";
    

}
echo "</TABLE>\n";
?>
thats my code and obviously its wrong


Could someone help me please....
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
creating module aa_sauron Nuke 7.x - General 5 11-30-2006 03:08 PM
Request - Creating a block ... Theberge43 Nuke 7.x - Blocks 0 07-29-2005 03:06 PM
question about creating this block sorn Nuke 7.x - Blocks 3 05-21-2005 09:36 AM
Creating a page. ps2cho Nuke 7.x - General 3 04-10-2005 06:05 PM
need help creating/modifying a block elb0m Nuke 6.5 to 6.9 - Blocks 6 04-17-2003 07:30 AM




vBulletin Skin developed by: vBStyles.com


LinkBacks Enabled by vBSEO 3.3.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31