3raser Posted April 1, 2010 Share Posted April 1, 2010 PHP error code: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home6/clubzobb/public_html/Homepage/profiles.php on line 215 The code that makes the error: if ($comments==1) { mysql_query("SELECT * FROM profilecomments WHERE touser='$output'"); while ($row = mysql_fetch_assoc($get)) { if ($row[reported]==1) { $reporttext = "[Report]"; } else { $reporttext = "Message Reported"; } $info = "Posted by ". $row[fromuser] ." on ". $row[date] ."<div align='right'>". $reportext ."</div><br><br>". $row[message] ."<hr><br>"; $info2 "<a href='profiles.php?addcomment=". $id55 ."'></a>Add a comment to ". $output ."'s profile!"; } } else { mysql_query("SELECT * FROM profilecomments WHERE touser='$username'"); while ($row = mysql_fetch_assoc($get)) { if ($row[reported]==1) { $reporttext = "[Report]"; } else { $reporttext = "Message Reported"; } $info = "Posted by ". $row[fromuser] ." on ". $row[date] ."<div align='right'>". $reportext ."</div><br><br>". $row[message] ."<hr><br>"; $info2 "<a href='profiles.php?addcomment=". $id55 ."'></a>Add a comment to ". $username ."'s profile!"; } } if ($viewcount==1) { mysql_query("UPDATE users SET profileviews = profileviews + 1 WHERE username='$output'"); } echo "$message57"; echo $info; echo $info2; Link to comment https://forums.phpfreaks.com/topic/197196-error-t_constant_encapsed_string/ Share on other sites More sharing options...
Rustywolf Posted April 1, 2010 Share Posted April 1, 2010 i think your first while script has an extra } in it Also, it means theres some code which has ' ' or " " around it when it isnt supposed/needs something else i got this error using Die ""; instead of Die(""); Link to comment https://forums.phpfreaks.com/topic/197196-error-t_constant_encapsed_string/#findComment-1035079 Share on other sites More sharing options...
3raser Posted April 1, 2010 Author Share Posted April 1, 2010 My first while doesn't have an extra }, I double checked. I also didn't see anything with " or ' that as causing the error. And what are you talking about with the die's? Link to comment https://forums.phpfreaks.com/topic/197196-error-t_constant_encapsed_string/#findComment-1035080 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.