Jump to content

[SOLVED] $end error


bravo14

Recommended Posts

Hello all

 

I have the following error on a page

 

Parse error: syntax error, unexpected $end in /home/fhlinux171/b/bravo14.co.uk/user/htdocs/gavster/article.php on line 107

<?php
$con = mysql_connect('213.171.219.92', 'gav', 'gavin', true);
if(!$con)
{
      die('Could not connect: ' . mysql_error());
}
mysql_select_db('gavstersays', $con);
$result = mysql_query('SELECT * FROM `comments` where `post_id`=\'' . $_GET['post_id'] . '\'' , $con) or die(mysql_error());
if(mysql_num_rows($result) < 1) 
{ 

   echo('<tr><td>Sorry, no results were found.</td></tr>'); 
} 
else 
{ 
   while($row = mysql_fetch_array($result))
{
echo ('<div class="comment">');
echo('<p>'.$row[name].' | '.$row[commentdate].'</p>');
echo('<p>'.$row[comment].'</p>');
echo('</div>');
mysql_close($con);
?>

 

Line 107 is </html> I can't spit anything wrong with the code, but have probably gone code blind.

 

Any ideas

 

 

Link to comment
https://forums.phpfreaks.com/topic/116654-solved-end-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.