Re: RSS Feed using PHP/MySQL errors

From: Date: Thu, 07 Aug 2008 10:05:16 +0000
Subject: Re: RSS Feed using PHP/MySQL errors
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-277803@lists.php.net to get a copy of this message
Don Mak wrote:
Trying to create an articles rss feed for my site and I keep getting an error that says: ===== A semi colon character was expected. Line: 7 Character: 60 <link>http://www.chirunning.com/shop/pages.php?pageid=19&id=383</link> =====
This is an easy one: in both of the following lines @mysql_connect('localhost', 'xxxxx', 'xxxxx') or die('ERROR--CAN'T CONNECT TO SERVER'); @mysql_select_db('shop') or die('ERROR--CAN'T CONNECT TO DB'); you have an unescaped "'" in the die() message. Suggest you use one of: die("ERROR--CAN'T CONNECT TO SERVER"); die('ERROR--CAN\'T CONNECT TO SERVER'); die('ERROR--CANNOT CONNECT TO SERVER'); // English is a very powerful language!! and similar for the other message... There may be other errors in your code, but that's all you were asking about. -- Peter Ford phone: 01580 893333 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent

« previous php.general (#277803) next »