gathos Posted August 21, 2008 Share Posted August 21, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/120731-solved-i-need-another-set-of-eyes-to-check-for-my-error/ Share on other sites More sharing options...
uniflare Posted August 21, 2008 Share Posted August 21, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/120731-solved-i-need-another-set-of-eyes-to-check-for-my-error/#findComment-622154 Share on other sites More sharing options...
lemmin Posted August 21, 2008 Share Posted August 21, 2008 The end of that long line is missing the concatination operator: ".$row['id']" should be: ".$row['id']." Quote Link to comment https://forums.phpfreaks.com/topic/120731-solved-i-need-another-set-of-eyes-to-check-for-my-error/#findComment-622155 Share on other sites More sharing options...
uniflare Posted August 21, 2008 Share Posted August 21, 2008 nice catch lol. Quote Link to comment https://forums.phpfreaks.com/topic/120731-solved-i-need-another-set-of-eyes-to-check-for-my-error/#findComment-622156 Share on other sites More sharing options...
gathos Posted August 21, 2008 Author Share Posted August 21, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/120731-solved-i-need-another-set-of-eyes-to-check-for-my-error/#findComment-622164 Share on other sites More sharing options...
lemmin Posted August 21, 2008 Share Posted August 21, 2008 It should be at the bottom left attached to the bar that is down there. Quote Link to comment https://forums.phpfreaks.com/topic/120731-solved-i-need-another-set-of-eyes-to-check-for-my-error/#findComment-622169 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.