making this look readable?

making this look readable?

am 30.10.2007 16:25:26 von paul814

How can I separate all my entries so that they look presentable and
readable on the page?
=====


View Editorial report




Editorial:







$host="localhost";
$user="root";
$pass="";
$db="productiondb";
$con = mysql_connect($host, $user, $pass);

$eddate = $_POST["editorialdate"];
$edname = $_POST["editorialname"];
$edcomments = $_POST["editorialdescription"];

if (!$con)
{
die('Unable to connect: ' . mysql_error());
}
mysql_select_db($db, $con) or die('Unable to connect: ' .
mysql_error());


$sql = "SELECT * FROM EDITORIAL ORDER BY EDITORIALDATE DESC";
$rs = mysql_query($sql,$con);


while($row=mysql_fetch_object($rs)){


print "
";
print $row->editorialdate ;
print $row->editorialname ;
print $row->editorialcomments;
print "
";
}

?>
=======
Maybe something like this:
DATE
NAME
COMMENTS

** a couple spaces and then the next record **

DATE
NAME
COMMENTS

I've tried this:

print "
";
print "

" . $row->eddate . "

";
print "

" . $row->edname . "

";
print "

" . $row->edcomments "

";
print "
";

But I get an error: Parse error: syntax error, unexpected
T_CONSTANT_ENCAPSED_STRING in C:\xampp\htdocs\dailyreport\view-
editorial.php on line 43

Re: making this look readable?

am 30.10.2007 19:23:56 von Brendan Gillatt

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

paul814@excite.com wrote:

> print "

";
> print "

" . $row->eddate . "

";
> print "

" . $row->edname . "

";
> print "

" . $row->edcomments "

";
> print "
";
>
> But I get an error: Parse error: syntax error, unexpected
> T_CONSTANT_ENCAPSED_STRING in C:\xampp\htdocs\dailyreport\view-
> editorial.php on line 43
>

You missed a period after $row->edcomments

I suggest you output each record in a table for best readability.

- --
Brendan Gillatt
brendan {at} brendangillatt {dot} co {dot} uk
http://www.brendangillatt.co.uk
PGP Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xBACD7433
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)

iD8DBQFHJ3a8kA9dCbrNdDMRAtGKAKCxYKPHwpK8Z3bXkM/R7jqZPqi8AwCg lNKD
z23TU2Nlsq13/v7tFjVhXlw=
=3V9R
-----END PGP SIGNATURE-----