Hall of Famer Posted October 30, 2010 Share Posted October 30, 2010 Well sorry to bother you guys with this seemingly stupid problem. I have a file hmgc.php from a friend, and I try to modify the codes myself to add some sort of features to my site. Unfortunately, I am unable to proceed because of this error: Parse error: syntax error, unexpected T_STRING in /home7/pkmnhofc/public_html/adoptables/hmgc.php on line 115 The file is attached in this message already, please take a look at it and tell me what exactly was wrong? I tried to add another if-elseif-else statement within an else statement, may this be a problem? Also this is the scripts around line 115 looks like: if($act == "2"){ $query = "SELECT * FROM ".$prefix."user_inventory WHERE item_owner='$loggedinname' and item_name='Old Rod'"; $result = mysql_query($query); $num = mysql_numrows($result); if($num == 0){ $article_title = "Oops it appears that you do not have an Old Rod yet..."; $article_content = "<center><table style='color: #FFFF31; background: Green; width: 400px; border: 1px solid #9BDDFF;'><tr><td> It seems that you do not have an Old Rod in your inventory yet, are you sure it is the best choice for you to fish without a rod?<br><br> To fix this issue, simply go back and take Fishing Quiz. You syhould be able to acquire an Old Rod for yourself if you answer all these questions successfully. Trust me, they aint really hard at all if you know something about pokemon and the fishing mechanism already.<br> <br><a href='fishingquiz.php'>Take the Fishing Quiz now!!!</a> } else{ $randnum1 = rand(1, 500); if($randnum1 >= 1 and $randnum1 < 225){ $article_title = "You got a Magikarp"; $article_content = "<center><table style='color: #b60400; background: black; width: 400px; border: 1px solid #b60400;'><tr><td><br><br> Now is your chance to adopt a wild Magikarp!</td></tr></table></center>"; } else if($randnum1 >= 225 and $randnum1 < 250){ $article_title = "You got a Goldeen"; $article_content = "<center><table style='color: #b60400; background: black; width: 400px; border: 1px solid #b60400;'><tr><td><br><br> Now is your chance to adopt a wild Goldeen</td></tr></table></center>"; } else{ $article_title = "Not even a bite"; $article_content = "<center><table style='color: #b60400; background: black; width: 400px; border: 1px solid #b60400;'><tr><td><br><br> Too bad you got nothing...</td></tr></table></center>"; } } } Thank you so much for reading this thread, I appreciate it a lot. [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/217290-syntax-error-unexpected-t_string-in/ Share on other sites More sharing options...
revraz Posted October 30, 2010 Share Posted October 30, 2010 Missing your ending quote on $article_content as well as a semi colon. Quote Link to comment https://forums.phpfreaks.com/topic/217290-syntax-error-unexpected-t_string-in/#findComment-1128359 Share on other sites More sharing options...
Hall of Famer Posted October 30, 2010 Author Share Posted October 30, 2010 Missing your ending quote on $article_content as well as a semi colon. Umm can you explain this again? I think I know some sort of codes are missing, but just cant figure out where the missing codes are supposed to be... Quote Link to comment https://forums.phpfreaks.com/topic/217290-syntax-error-unexpected-t_string-in/#findComment-1128360 Share on other sites More sharing options...
revraz Posted October 30, 2010 Share Posted October 30, 2010 $article_content = "<center><table style='color: #FFFF31; background: Green; width: 400px; border: 1px solid #9BDDFF;'><tr><td> It seems that you do not have an Old Rod in your inventory yet, are you sure it is the best choice for you to fish without a rod?<br><br> To fix this issue, simply go back and take Fishing Quiz. You syhould be able to acquire an Old Rod for yourself if you answer all these questions successfully. Trust me, they aint really hard at all if you know something about pokemon and the fishing mechanism already.<br> <br><a href='fishingquiz.php'>Take the Fishing Quiz now!!!</a>"; } Quote Link to comment https://forums.phpfreaks.com/topic/217290-syntax-error-unexpected-t_string-in/#findComment-1128361 Share on other sites More sharing options...
Hall of Famer Posted October 30, 2010 Author Share Posted October 30, 2010 Thank you so much, it helped. The page is loading fine. XD Quote Link to comment https://forums.phpfreaks.com/topic/217290-syntax-error-unexpected-t_string-in/#findComment-1128362 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.