mknjhill Posted April 9, 2011 Share Posted April 9, 2011 Ok so heres the deal, my friend wrote this for me, hes currently unavailable and i messed it up a bit. http://pastebin.com/k937xDve < there is the code. all i did is add the target="name" onclick="window.open('http://www.web-hosting-service.org/green-certified.php?greensite=.$domain.','name','height=255,width=250,toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no'); return false;" bit. and now i get the error Parse error: syntax error, unexpected T_STRING in seal-generator.php Quote Link to comment https://forums.phpfreaks.com/topic/233230-noob-problem/ Share on other sites More sharing options...
nethnet Posted April 9, 2011 Share Posted April 9, 2011 You need to escape every single quote in the line you added by placing a backslash in front of it. Quote Link to comment https://forums.phpfreaks.com/topic/233230-noob-problem/#findComment-1199466 Share on other sites More sharing options...
nethnet Posted April 9, 2011 Share Posted April 9, 2011 Also, this section of the code should look like: greensite='.$domain.' ^ These should be the only single quotes in that line that you do not escape. Quote Link to comment https://forums.phpfreaks.com/topic/233230-noob-problem/#findComment-1199467 Share on other sites More sharing options...
mknjhill Posted April 9, 2011 Author Share Posted April 9, 2011 Ok like i said, noob. so before all ' id put a \ ? Quote Link to comment https://forums.phpfreaks.com/topic/233230-noob-problem/#findComment-1199469 Share on other sites More sharing options...
nethnet Posted April 9, 2011 Share Posted April 9, 2011 Yes, the problem is that when PHP comes across those single quotes, it thinks it is supposed to stop echoing and move on to the next command, but you don't want it to do that, so you need to escape them by placing a \ before them. This will essentially tell the PHP parser to skip over them in terms of syntax. So yeah, put a backslash (\) before all of the single quotes (') except for the two that I pointed out earlier, since you DO what PHP to parse those Quote Link to comment https://forums.phpfreaks.com/topic/233230-noob-problem/#findComment-1199474 Share on other sites More sharing options...
mknjhill Posted April 9, 2011 Author Share Posted April 9, 2011 Yep Thanks worked great!! Your awesome lol Quote Link to comment https://forums.phpfreaks.com/topic/233230-noob-problem/#findComment-1199478 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.