- #1
sean1234
- 40
- 0
<?php
require("header.php");
$sql = "select entries. * , categories.cat FROM entries, categories
WHERE entries.cat_id = categories.id
ORDER BY dateposted DESC
LIMIT 1;";
$result = mysql_query($sql);
$row = mysql_fetch_assoc($result);
echo "<h2><a href='viewentry.php?id=" . $row['id']
. "'>" . $row['subject'] .
"</a></h2><br />;
echo "<i>In<a href='viewcat.php?id=" . $row['cat_id']
."'>" . $row['cat'] .
"</a> - Posted on " . date("D jS F Y g.iA",
strtotime($row['dateposted'])) .
"</i>";
echo "<p>";
echo n12br($row['body']);
echo "</p>";
The error message is:
Parse error: syntax error, unexpected '>' in C:\xampp\htdocs\index.php on line 15
I'm not sure why the '>' is wrong.
require("header.php");
$sql = "select entries. * , categories.cat FROM entries, categories
WHERE entries.cat_id = categories.id
ORDER BY dateposted DESC
LIMIT 1;";
$result = mysql_query($sql);
$row = mysql_fetch_assoc($result);
echo "<h2><a href='viewentry.php?id=" . $row['id']
. "'>" . $row['subject'] .
"</a></h2><br />;
echo "<i>In<a href='viewcat.php?id=" . $row['cat_id']
."'>" . $row['cat'] .
"</a> - Posted on " . date("D jS F Y g.iA",
strtotime($row['dateposted'])) .
"</i>";
echo "<p>";
echo n12br($row['body']);
echo "</p>";
The error message is:
Parse error: syntax error, unexpected '>' in C:\xampp\htdocs\index.php on line 15
I'm not sure why the '>' is wrong.