RE: [PHP] help with parse error

2003-08-26 Thread Paul Fitzpatrick

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:[EMAIL PROTECTED] 
Sent: Monday, August 25, 2003 5:41 PM
To: [EMAIL PROTECTED]
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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Help with parse error

2003-08-20 Thread Peter James
Can you give us a couple lines either side of this?  This could be due to a
missing semicolon on the previous line.

--
Peter James
Editor-in-Chief, php|architect Magazine
[EMAIL PROTECTED]

php|architect
The Magazine for PHP Professionals
http://www.phparch.com


- Original Message - 
From: James Johnson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 20, 2003 1:07 AM
Subject: [PHP] Help with parse error


 Hi,

 I'm trying to figure out this error I'm getting in my code:

 Parse error: parse error in /home/.paco/campuscb/AdPayment.php on line 9

 This is the code on line 9:

 $sDate = date('Y-m-d',time());

 Does this look valid?
 Thanks,
 James


 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Help with parse error

2003-08-20 Thread James Johnson
Yup, that was it. Missing a semi-colon on line 8.

Thanks,
James

-Original Message-
From: Peter James [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 20, 2003 1:17 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Help with parse error


Can you give us a couple lines either side of this?  This could be due
to a missing semicolon on the previous line.

--
Peter James
Editor-in-Chief, php|architect Magazine
[EMAIL PROTECTED]

php|architect
The Magazine for PHP Professionals
http://www.phparch.com


- Original Message - 
From: James Johnson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 20, 2003 1:07 AM
Subject: [PHP] Help with parse error


 Hi,

 I'm trying to figure out this error I'm getting in my code:

 Parse error: parse error in /home/.paco/campuscb/AdPayment.php on line

 9

 This is the code on line 9:

 $sDate = date('Y-m-d',time());

 Does this look valid?
 Thanks,
 James


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php