|
i have my webpage displaying content from my database, title of post and the actual post itself. do i create a table and have them display in it or what can i do to tidy it up or what are the options?? here is my code and what it looks like.. thanks alot.
<?php
$con = mysql_connect("socweb3.napier.ac.uk","a6005321","5 change");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("a6005321", $con);
$var = mysql_query("SELECT * FROM posts");
while($row = mysql_fetch_array($var)){
echo $row['title'];
echo $row['post'];
echo "<hr />";
}
//
mysql_close($con);
Last edited by ajm22386; 08-21-2008 at 10:42 AM..
|