Jump to content

T_STRING error


BIGDOG

Recommended Posts

can someone please tell me the error in the following code?

Parse error: parse error, unexpected T_STRING, expecting ',' or ';'


echo "<td><a href="http://www.xxx.com/cart.php?action=add&item=".$row[product_id].""target="_blank" onMouseOver="window.status='Add To Cart!'; return true;" onMouseOut="window.status=''; return true;" onClick="window.open(this.href,0,'directories=no,location=no,menubar=no,status=no,titlebar=no,toolbar=no,scrollbars=yes,width=700,height=400,top=5,left=5, resizable=yes');return false">Add To Cart!</a></td>\n";
Link to comment
Share on other sites

[!--quoteo(post=352739:date=Mar 7 2006, 10:00 PM:name=BIGDOG)--][div class=\'quotetop\']QUOTE(BIGDOG @ Mar 7 2006, 10:00 PM) [snapback]352739[/snapback][/div][div class=\'quotemain\'][!--quotec--]
can someone please tell me the error in the following code?

Parse error: parse error, unexpected T_STRING, expecting ',' or ';'
echo "<td><a href="http://www.xxx.com/cart.php?action=add&item=".$row[product_id].""target="_blank" onMouseOver="window.status='Add To Cart!'; return true;" onMouseOut="window.status=''; return true;" onClick="window.open(this.href,0,'directories=no,location=no,menubar=no,status=no,titlebar=no,toolbar=no,scrollbars=yes,width=700,height=400,top=5,left=5, resizable=yes');return false">Add To Cart!</a></td>\n";
[/quote]


You have to escape the "s you actually want output.

ie:
echo "<img src=\"image.gif\" alt=\"A Picture\">";
Link to comment
Share on other sites

[!--quoteo(post=352742:date=Mar 7 2006, 11:07 PM:name=greycap)--][div class=\'quotetop\']QUOTE(greycap @ Mar 7 2006, 11:07 PM) [snapback]352742[/snapback][/div][div class=\'quotemain\'][!--quotec--]
You have to escape the "s you actually want output.

ie:
echo "<img src=\"image.gif\" alt=\"A Picture\">";
[/quote]


Would you mind fixing it for me, I've had a long day and I am staring at this blankly. I need another set of eyes please
Link to comment
Share on other sites

[code]echo "<td><a href=\"http://www.xxx.com/cart.php?action=add&item=".$row[product_id]."\" target=\"_blank\" onMouseOver=\"window.status='Add To Cart!'; return true;\" onMouseOut=\"window.status=''; return true;\" onClick=\"window.open(this.href, 0, ' directories=no, location=no, menubar=no, status=no, titlebar=no, toolbar=no, scrollbars=yes, width=700, height=400, top=5, left=5, resizable=yes'); return false\">Add To Cart!</a></td>\n";[/code]
Link to comment
Share on other sites

[!--quoteo(post=352761:date=Mar 8 2006, 12:02 AM:name=wickning1)--][div class=\'quotetop\']QUOTE(wickning1 @ Mar 8 2006, 12:02 AM) [snapback]352761[/snapback][/div][div class=\'quotemain\'][!--quotec--]
[code]echo "<td><a href=\"http://www.xxx.com/cart.php?action=add&item=".$row[product_id]."\" target=\"_blank\" onMouseOver=\"window.status='Add To Cart!'; return true;\" onMouseOut=\"window.status=''; return true;\" onClick=\"window.open(this.href, 0, ' directories=no, location=no, menubar=no, status=no, titlebar=no, toolbar=no, scrollbars=yes, width=700, height=400, top=5, left=5, resizable=yes'); return false\">Add To Cart!</a></td>\n";[/code]
[/quote]


thank very much you i appreciate that
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.