bravo14 Posted July 13, 2008 Share Posted July 13, 2008 Hi All Using the code below I am getting an error of Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/fhlinux171/b/bravo14.co.uk/user/htdocs/gavster/headlines.php on line 41, however I have copied a page that works and changed the relevant parts which will mean that line 41 is OK, I appreciate that the code could probably be slicker, however still learning php, can anyone spot any errors with the code that would get the error ? <?php $con = mysql_connect('ip', 'user', 'password', true); if(!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db('gavstersays', $con); $result = mysql_query('SELECT * FROM `posts`where `topic_id`=\'' . $_GET['topic_id'] . '\'' , $con) or die(mysql_error()); if(mysql_num_rows($result) < 1) { echo('<tr><td colspan="2">Sorry, no results were found.</td></tr>'); } else { while($row = mysql_fetch_array($result)) { echo('<tr><td>'.date("d-M-Y", strtotime($row[postdate])).'</td>'); echo('<td><a href="article.php?post_id='.$row[post_id].'">'.$row[title].'</a></td></tr>'); } } ?> Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted July 13, 2008 Share Posted July 13, 2008 I've not counted, but i'm fairly confident that there's not 41 lines in the code you posted. Any chance of pointing us to the correct one? Quote Link to comment Share on other sites More sharing options...
unsider Posted July 13, 2008 Share Posted July 13, 2008 Ya, you're going to need to point out the right line, makes it easier on us Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.