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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.