RE: [PHP] help with parse error
| From: | Paul Fitzpatrick | Date: | Tue, 26 Aug 2003 18:07:29 +0000 |
| Subject: | RE: [PHP] help with parse error | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-160702@lists.php.net to get a copy of this message | ||
Hi,
Maybe..
$sql = "SELECT Title, SubT, Author, Story FROM SiteNews;"
should be
$sql = "SELECT Title, SubT, Author, Story FROM SiteNews";
-----Original Message-----
From: Stevie D Peele [mailto:sdp2006@juno.com]
Sent: Monday, August 25, 2003 5:41 PM
To: php-general@lists.php.net
Subject: [PHP] help with parse error
I have a parse error on line 12 --
-------------------------------------------
<?php
include ('config.php');
$link = @mysql_pconnect($location, $username, $password)
or die("Could not connect to the databaseserver. Please go back and
try again or try again later.");
@mysql_select_db($database,$link)
or die ("Could not select database. Please go back and try again or
try again later.");
$sql = "SELECT Title, SubT, Author, Story FROM SiteNews;"
$news = mysql_query($sql,$link) or die(mysql_error());
if ($news){
if (mysql_num_rows($news)== 0){
echo("No newsitems found.");
}
else{
while ($row = mysql_fetch_assoc($news)){
echo("<b>");
echo("<font size=6>");
echo($row['Title']. "<br />");
echo("</font>");
echo("<font size=4>");
echo($row['SubT']."<br />");
echo("</font>");
echo("</b>");
echo($row['Author']. "<br />");
echo($row['Story']);
echo("<hr noshade color=black size=1/>");
}
}
}
else{
echo("Queryproblem");
}
?>
------------------------------------------
Can anyone see what the error is?? I can't
Thanks