Page 1 of 1

Fancy new display

Posted: Sun Oct 16, 2011 9:44 am
by stijn22
Hi,

I'm currently making a news section. With this code I have a nice, pretty standard, output:

Code: Select all

<?php
							
							require_once("connect.php"); //Voor de connectie met de database.
							
							$select = "SELECT * FROM nieuws ORDER BY Id DESC";
							$query = mysql_query($select) or die(mysql_error());

							while ($list = mysql_fetch_object($query))
							
							{
    					
    					echo "<b>Datum: </b>$list->datum<br/>";
    					echo "<b>Bericht: </b>$list->bericht<br/>";
    					echo "<b>Auteur: </b>$list->auteur<br/>";
    					echo "<img src=\"images/line-nieuws.jpg\"><br/><br/>";
							}
              ?>
Ok, this is just plain text output, with a line underneath each item. But I saw this site: http://stabyourself.net/ and I think that their news display (with the date and title) looked really good. And I want something similar. Does anyone have a nice link of a tutorial, or can someone explain it here?

Re: Fancy new display

Posted: Mon Oct 17, 2011 1:20 pm
by Celauran
If you don't already have it, I'd recommend getting the Firebug extension. Right-click on any element and choose "Inspect element". Once you see how he's got things laid out, working out the required PHP should be trivial.