BIGDOG Posted March 8, 2006 Share Posted March 8, 2006 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 Link to comment Share on other sites More sharing options...
greycap Posted March 8, 2006 Share Posted March 8, 2006 [!--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\">"; Quote Link to comment Share on other sites More sharing options...
BIGDOG Posted March 8, 2006 Author Share Posted March 8, 2006 [!--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 Quote Link to comment Share on other sites More sharing options...
wickning1 Posted March 8, 2006 Share Posted March 8, 2006 [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 Link to comment Share on other sites More sharing options...
BIGDOG Posted March 8, 2006 Author Share Posted March 8, 2006 [!--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 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.