Jump to content

What is wrong with this code?


velo1ever

Recommended Posts

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.)

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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>';

Link to comment
Share on other sites

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!

 

 

Link to comment
Share on other sites

'<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>';

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.