velo1ever Posted February 28, 2008 Share Posted February 28, 2008 I am having trouble with this code. I am putting it into an Oscommerce store. The odd thing, it will work on the main page, but once I insert the code into a side box, it will not work and gives me this error, which is in the first line. Parse error: syntax error, unexpected T_STRING, expecting ')' '<form style="border:1px solid #ccc;padding:3px;text-align:center;" action="xxxxxx" method="post" target="popupwindow" onsubmit="window.open('xxxxxxxx', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true"><p>Enter your email address:</p><p><input type="text" style="width:140px" name="email"/></p><input type="hidden" value="xxxx://feeds.feedburner.com/~e?ffid=1697582" name="url"/><input type="hidden" value="Girls Know What They Want.com--"Where Our Customers Come First!"" name="title"/><input type="hidden" name="loc" value="en_US"/><input type="submit" value="Subscribe" /><p>Delivered by <a href="xxxxxx" target="_blank">FeedBurner</a></p></form>'); Thank you for looking and any advice. (I inserted some xxxx where the links go, so that the page isn't filled with links, if I should repost, with the true code, please let me know.) Quote Link to comment Share on other sites More sharing options...
obsidian Posted February 28, 2008 Share Posted February 28, 2008 Sounds like where you are inserting it is within another function or some area where a parenthetical needs to be closed before you can place your string. Also, you have the closing parenthetical, but there is no opening or command to output or use the string in any way. Can you give us a little more information as to how you are inserting this into osCommerce? Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted February 28, 2008 Share Posted February 28, 2008 Everything. Um... please place the code with in the code BBCode tags, and please format it so it is readable... and post your PHP as well so we can see the the string. Quote Link to comment Share on other sites More sharing options...
aschk Posted February 28, 2008 Share Posted February 28, 2008 Read code please... it seems you're putting this into the PHP somewhere (hence your error) and i suspect it's because you're echo'ing what you posted, and because you haven't escaped the single quotes (') in that string... e.g. ...ow" onsubmit="window.open(\'xxxxxxxx\', \'popup.... notice the backslashes in the above. You're probably missing those. Quote Link to comment Share on other sites More sharing options...
velo1ever Posted February 29, 2008 Author Share Posted February 29, 2008 Wow..this board is great! Thank you for all your help. I tried a few things, and of course, no luck... How can I post the code to the board without just cutting and pasting, or is that the best way? I'll post the whole code on the page. Thank you!!! Quote Link to comment Share on other sites More sharing options...
deansatch Posted February 29, 2008 Share Posted February 29, 2008 Try that: echo'<form style="border:1px solid #ccc;padding:3px;text-align:center;" action="xxxxxx" method="post" target="popupwindow" onsubmit="window.open(\'xxxxxxxx\', \'popupwindow\', \'scrollbars=yes,width=550,height=520\');return true">'. '<p>Enter your email address:</p>'. '<p><input type="text" style="width:140px" name="email"/></p>'. '<input type="hidden" value="xxxx://feeds.feedburner.com/~e?ffid=1697582" name="url"/>'. '<input type="hidden" value="Girls Know What They Want.com--"Where Our Customers Come First!"" name="title"/>'. '<input type="hidden" name="loc" value="en_US"/>'. '<input type="submit" value="Subscribe" />'. '<p>Delivered by <a href="xxxxxx" target="_blank">FeedBurner</a></p>'. '</form>'; Quote Link to comment Share on other sites More sharing options...
velo1ever Posted February 29, 2008 Author Share Posted February 29, 2008 Didn't work It gave me this error Parse error: syntax error, unexpected T_ECHO in the first line. If you can let me know how to post the code, as I see you did a pretty cool box to post the code, I'll post the whole code in the page, so people can take a look. Quote Link to comment Share on other sites More sharing options...
peranha Posted February 29, 2008 Share Posted February 29, 2008 The # sign on the reply page is the code tag. It is above the 3rd smile from the end. Quote Link to comment Share on other sites More sharing options...
velo1ever Posted February 29, 2008 Author Share Posted February 29, 2008 Here is the code for the whole page. <?php /* $Id: currencies.php,v 1.1.1.1 2004/03/04 23:42:25 ccwjr Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ if (isset($currencies) && is_object($currencies)) { ?> <!-- currencies //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => '<font color="' . $font_color . '">' . BOX_HEADING_CURRENCIES . '</font>'); new SideinfoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents = array(); $info_box_contents[] = array('text' => '<form style="/border:1px solid #ccc;padding:3px;text-align:center;/" action="http://www.feedburner.com/fb/a/emailverify" method="post" target="popupwindow" onsubmit="window.open('http://www.feedburner.com/fb/a/emailverifySubmit?feedId=1697582', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true"><p>Enter your email address:</p><p><input type="text" style="width:140px" name="email"/></p><input type="hidden" value="http://feeds.feedburner.com/~e?ffid=1697582" name="url"/><input type="hidden" value="Girls Know What They Want.com--"Where Our Customers Come First!"" name="title"/><input type="hidden" name="loc" value="en_US"/><input type="submit" value="Subscribe" /><p>Delivered by <a href="http://www.feedburner.com" target="_blank">FeedBurner</a></p></form>'); new SideinfoBox($info_box_contents); ?> </td> <tr> <td align="center" valign="top"><img src="templates/2553/images/infoBox_foot.jpg" width="161" height="17"></td> </tr> <!-- currencies_eof //--> <?php } ?> And I have inserted different set of code into the same box and it would work, but the code below wouldn't, so hopefully it is just within the set of code below...yet again, I just try things through trial and error '<form style="/border:1px solid #ccc;padding:3px;text-align:center;/" action="http://www.feedburner.com/fb/a/emailverify" method="post" target="popupwindow" onsubmit="window.open('http://www.feedburner.com/fb/a/emailverifySubmit?feedId=1697582', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true"><p>Enter your email address:</p><p><input type="text" style="width:140px" name="email"/></p><input type="hidden" value="http://feeds.feedburner.com/~e?ffid=1697582" name="url"/><input type="hidden" value="Girls Know What They Want.com--"Where Our Customers Come First!"" name="title"/><input type="hidden" name="loc" value="en_US"/><input type="submit" value="Subscribe" /><p>Delivered by <a href="http://www.feedburner.com" target="_blank">FeedBurner</a></p></form>'); Thank you for looking and helping!!! This board is awesome! Quote Link to comment Share on other sites More sharing options...
peranha Posted February 29, 2008 Share Posted February 29, 2008 '<form style="/border:1px solid #ccc;padding:3px;text-align:center;/" action="http://www.feedburner.com/fb/a/emailverify" method="post" target="popupwindow" onsubmit="window.open('http://www.feedburner.com/fb/a/emailverifySubmit?feedId=1697582', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true"><p>Enter your email address:</p><p><input type="text" style="width:140px" name="email"/></p><input type="hidden" value="http://feeds.feedburner.com/~e?ffid=1697582" name="url"/><input type="hidden" value="Girls Know What They Want.com--"Where Our Customers Come First!"" name="title"/><input type="hidden" name="loc" value="en_US"/><input type="submit" value="Subscribe" /><p>Delivered by <a href="http://www.feedburner.com" target="_blank">FeedBurner</a></p></form>'); the last ) should not be there. '<form style="/border:1px solid #ccc;padding:3px;text-align:center;/" action="http://www.feedburner.com/fb/a/emailverify" method="post" target="popupwindow" onsubmit="window.open('http://www.feedburner.com/fb/a/emailverifySubmit?feedId=1697582', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true"><p>Enter your email address:</p><p><input type="text" style="width:140px" name="email"/></p><input type="hidden" value="http://feeds.feedburner.com/~e?ffid=1697582" name="url"/><input type="hidden" value="Girls Know What They Want.com--"Where Our Customers Come First!"" name="title"/><input type="hidden" name="loc" value="en_US"/><input type="submit" value="Subscribe" /><p>Delivered by <a href="http://www.feedburner.com" target="_blank">FeedBurner</a></p></form>'; Quote Link to comment Share on other sites More sharing options...
nadeemshafi9 Posted February 29, 2008 Share Posted February 29, 2008 you use your " and ' wrong its echo "<blah=\"blah\">"; and u need a space after echo, you cant have ' " " ', its " \"\" ", ' ' is for js, your code is madness this is like somone stabing me in my eye, i never seen such wrongness you get a F- u fail joke. Quote Link to comment Share on other sites More sharing options...
Tomek Posted February 29, 2008 Share Posted February 29, 2008 Need help with code: Parse error: parse error, expecting `','' or `';'' in /3w/wz.cz/e/egeg/includes/functions.php on line 892 The line:(in functions.php) { echo "<html>\n<body>\n" . $msg_title . "\n<b r /><b r />\n" . $msg_text . "</body>\n</html>"; } ??? This is a phpBB 2.0.0.2 forum ! thanks Quote Link to comment Share on other sites More sharing options...
nadeemshafi9 Posted February 29, 2008 Share Posted February 29, 2008 echo "<html>\n<body>\n".$msg_title."\n\n".$msg_text."</body>\n</html>"; Quote Link to comment Share on other sites More sharing options...
Tomek Posted February 29, 2008 Share Posted February 29, 2008 Thats not working ! :'( Quote Link to comment Share on other sites More sharing options...
nadeemshafi9 Posted February 29, 2008 Share Posted February 29, 2008 Thats not working ! :'( if thats line 189 and there are includes in that file then the line will be wrong you have to read the entire script, theres nothing wrong with this lione Quote Link to comment Share on other sites More sharing options...
deansatch Posted February 29, 2008 Share Posted February 29, 2008 echo "<html>\n<body>\n".$msg_title."\n\n".$msg_text."</body>\n</html>"; You don't really need to break out when using double quotes echo "<html>\n<body>\n$msg_title\n\n$msg_text</body>\n</html>"; Quote Link to comment 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.