Jump to content

[SOLVED] I need another set of eyes to check for my error


Recommended Posts

hi, so i'm getting an errorwhen i view the page.

 

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home/user/public_html/site/bobdisplay.php on line 45

 

now line 45 is the end of the while echo and all it is, is "; so it's not that line that is causing the problems.

however, i know which line is causing the problem. it's the <a href='...'></a>

as soon as i remove that line it all works, so what i need is another set of eyes to look over the line to see what i'm missing.

 

while($row = mysql_fetch_assoc($result)){
echo "<table width= '800 ' border= '1 '>";
   echo "<tr>
    <td>Publisher:</td>
    <td>".$row['publisher']."</td>
  </tr>
  <tr>
    <td>Comic Title:</td>
    <td>".$row['title']."</td>
  </tr>
  <tr>
    <td>Issue:</td>
    <td>".$row['issue']."</td>
  </tr>
  <tr>
    <td>Story arc:</td>
    <td>".$row['arc']."</td>
  </tr>
  <tr>
    <td>Release date:</td>
    <td>".$row['date']."</td>
  </tr>
  <tr>
    <td></td>
    <td>
<a href='../Editcomic.php?publisher='".$row['publisher']."&title=".$row['title']."&issue=".$row['issue']."&arc=".$row['arc']."&date=".$row['date']."&price=".$row['price']."&id=".$row['id']"'>Edit comic</a>
</td>
  </tr>
";
}
echo "</table>";
?>
</body>
</html>

 

oh and by the way, yes it is for a comic database. I SWEAR IT"S NOT FOR ME BUT MY BROTHER!!! (who i mooch off of to read the comics hehehe)

 

thanks ahead of time.

 

gathos

There does not seem to be any problem in that code, is there any more?

 

One way to debug is to compeltely remove certain pieces of code, reresh the page, then if the error is still there put the cut-ed code back in and take another chunk out. (if your code is not too long).

 

Also to split your code into multiple files.

 

Aside from that can you give the complete file? (Also try using a syntax highlighter, Notepad ++ is one i use and i great for spotting simple syntax errors like this).

 

 

Hope this helps.

wow. thanks, i appreciate your guys' help. yeah that was all it was. thank you very much for your help. sometimes a coder just looks a little to hard at his code, and can't see the mistakes.

 

thanks guys.

 

oh a side note, how do i say that this thread was solved? i've been looking but appearently not in the right places.

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.