Jump to content


Photo

T_STRING error


  • Please log in to reply
4 replies to this topic

#1 BIGDOG

BIGDOG
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 08 March 2006 - 04:00 AM

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

#2 greycap

greycap
  • Members
  • PipPipPip
  • Advanced Member
  • 31 posts

Posted 08 March 2006 - 04:07 AM

[!--quoteo(post=352739:date=Mar 7 2006, 10:00 PM:name=BIGDOG)--][div class=\'quotetop\']QUOTE(BIGDOG @ Mar 7 2006, 10:00 PM) View Post[/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\">";

#3 BIGDOG

BIGDOG
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 08 March 2006 - 04:14 AM

[!--quoteo(post=352742:date=Mar 7 2006, 11:07 PM:name=greycap)--][div class=\'quotetop\']QUOTE(greycap @ Mar 7 2006, 11:07 PM) View Post[/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

#4 wickning1

wickning1
  • Members
  • PipPipPip
  • Advanced Member
  • 405 posts

Posted 08 March 2006 - 05:02 AM

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


#5 BIGDOG

BIGDOG
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 08 March 2006 - 06:19 AM

[!--quoteo(post=352761:date=Mar 8 2006, 12:02 AM:name=wickning1)--][div class=\'quotetop\']QUOTE(wickning1 @ Mar 8 2006, 12:02 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
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]


thank very much you i appreciate that




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users