Old 08-07-2005   #1 (permalink)
Recursively call who?
 
GoldNetX's Avatar
 
Join Date: Nov 2003
Location: Pittsburgh, PA
Posts: 294

Send a message via AIM to GoldNetX
PHP News Problem

This is my code to display some news items from a MySQL Database.
It uses CSS to align the boxes and text, but for some reason the output is continually stacked on top of one another. All of the messages are in the source code when it is finished interpreting but only the last one written to the html is displayed. Not quite sure what the problem is.

If you want to get the full source here are the pages:

PHP: http://gusmay.tollfreepage.com/index.php
CSS: http://gusmay.tollfreepage.com/index.css
JS: http://gusmay.tollfreepage.com/index.js

Code:
<?php

        $query = "SELECT * FROM entry ORDER BY entry_id DESC";
	$result = @mysql_query($query);	
	$top = 0;

	if ($result){				
		while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
			
			echo "<div class=\"newsblock\" style=\"top:" . $top . ";\">";
			echo "<div class=\"newstop\"></div>";
			echo "<div class=\"newstopleft\"></div>";
			echo "<div class=\"newstopmid\">";
			echo $row[1];		
			echo "</div>";
			echo "<div class=\"newstopright\"></div>";
			echo "<div class=\"newsmid\"></div>";
			echo "<div class=\"newsbottom\"><br/>";
			echo $row[2];
			echo "</div></div>";
			$top = $top + 50;
		}
	}
?>
__________________

www.gusmayo.com
- Maybe a story or two -


www.jaloobie.com
... your new home ...

www.webinkproductions.com
- professional web application design -

Last edited by GoldNetX; 08-07-2005 at 06:11 AM..
GoldNetX is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 08-07-2005   #2 (permalink)
code anyone?
 
scrowler's Avatar
 
Join Date: Feb 2004
Location: New Zealand
Posts: 590

Send a message via MSN to scrowler Send a message via Skype™ to scrowler
looks fine to me, you could try not using absolute positioning... if not, try this tutorial: http://www.bluesfear.com/forum/index...howtopic=24474
__________________
BioRUST Tutorials - the birthplace
scrowler is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 08-07-2005   #3 (permalink)
Recursively call who?
 
GoldNetX's Avatar
 
Join Date: Nov 2003
Location: Pittsburgh, PA
Posts: 294

Send a message via AIM to GoldNetX
Thanks that fixed it perfectly. Looks good now.
__________________

www.gusmayo.com
- Maybe a story or two -


www.jaloobie.com
... your new home ...

www.webinkproductions.com
- professional web application design -
GoldNetX is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 08-07-2005   #4 (permalink)
Recursively call who?
 
GoldNetX's Avatar
 
Join Date: Nov 2003
Location: Pittsburgh, PA
Posts: 294

Send a message via AIM to GoldNetX
edit: *Solved. This post can be deleted.*
__________________

www.gusmayo.com
- Maybe a story or two -


www.jaloobie.com
... your new home ...

www.webinkproductions.com
- professional web application design -

Last edited by GoldNetX; 08-07-2005 at 08:56 PM..
GoldNetX is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Tutorial Trio! Man1c M0g Announcements 3 07-09-2005 09:15 AM
Help me with automated news script? ViciOuS HTML / PHP / ASP / JS 19 04-14-2005 05:47 AM
Chicken & The Egg Problem! Man1c M0g HTML / PHP / ASP / JS 3 04-05-2005 07:02 PM
Php... Joe HTML / PHP / ASP / JS 35 06-22-2004 12:08 AM
redhat problem Milkdrop General Discussions 3 12-14-2003 08:05 AM


All times are GMT +1. The time now is 05:58 PM.
Content Relevant URLs by vBSEO 3.2.0

Design & Content © BioRUST 2008 :: PRIVACY STATEMENT :: LEGAL INFORMATION :: ADVERTISING MEDIA KIT