Page 1 of 1

[56K WARN] html formatting problem

Posted: Thu Mar 30, 2006 11:37 am
by rami
i have some records in the database and i have following code which displays the last entered 6 records

Code: Select all

<?php $page_title = 'NMIS';
?>

	
<?php
require_once ('../mysql_connect1.php'); 
$page_title = 'view';
			$query = "SELECT * FROM notices order by date desc limit 6";
			$result= mysql_query($query);
echo '<table border="0" width="90%" cellspacing="3" cellpadding="3" align="center">
<tr>
<td align="left" width="100%" bgcolor="#00659C"><b><font color=white><center>Notice Board</center></font></b></td>
</tr>';

echo '</table>';

		if (mysql_num_rows($result) > 0) 
		{ // if there are any rows of data, fetch the data			
				$row = mysql_fetch_array ($result);
echo'<div align=\"center\"><img src=\"../uploads/". $_SESSION['user_id'].".jpg\" />';
				echo '<p>Subject: ' . $row['subject'] . '<br />';

				echo '<p>Date: ' . $row['date'] . '<br />';
				
echo '<p>Notice: ' . $row['notice'] . '<br /><br />';
echo'<a href=\"disnotice.php?uid={$row['notice_id']}\">full description</a>';

echo " <a href=\"prevnotice.php\"><center>Previous Notices</center></a></br>";	
echo " <a href=\"latestnav.php\"><b>Click here</b></a> to check latest notes,assignments,books.";
		} 
		else 
		{
			echo '<p>No data returned!</p>';
		} // mysql if end
	
?>
this displays records as
records 1
......records2
....
records....

but i want to display records as follows where do i need to change(off course making table)
i tried but didnt got exact result...
i want to display as follow
3 in first
then another 3
records1 record2 record3
records4...
Image
any help?
thanks

Posted: Thu Mar 30, 2006 11:43 am
by feyd
first two links in Useful Posts.

Posted: Thu Mar 30, 2006 11:54 am
by rami
thanks
i will have a look at that(i pray that is not about any rules for posting)
i always try to abide by rule...

any way if some gentle man can just make quick amendment to the code posted above that would be more than great.
may be 5 minutes...

thanks...
if not some hints and ideas...

thanks

BY THE WAY I LATER ONLY REALISED THAT IMAGE WAS 93 KB certainly it could have been reduced any way sorry for that..will take care from next time..but 93 kb is not big one to load here so...