Jump to content

Archived

This topic is now archived and is closed to further replies.

nickholt1972

Syntax error (i expect - it usually is!) help needed.

Recommended Posts

The following HTML code works fine in an HTML document. I've added a [b]<?php echo '[/b] at the beginning and an [b]'; ?>[/b] at the end and now I get

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/.sites/123/site117/web/buytest.php on line 3


[code]<?php
echo '<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">buy 
<input type="image" src="https://www.paypal.com/en_GB/i/btn/x-click-but22.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" />
<img alt="Add to basket" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1" />
<input type="hidden" name="add" value="1" />
<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="business" value="info@nicholasholt.co.uk" />
<input type="hidden" name="item_name" value="999">
<input type="hidden" name="item_number" value="999">
<input type="hidden" name="amount" value="999" />
<input type="hidden" name="page_style" value="Primary" />
<input type="hidden" name="no_shipping" value="2" />
<input type="hidden" name="return" value="http://www.appletreenappies.co.uk/store.php" />
<input type="hidden" name="currency_code" value="GBP" />
<input type="hidden" name="lc" value="GB" />
<input type="hidden" name="bn" value="PP-ShopCartBF" />
</form>';
?>[/code]

Its bound to be a syntax error but i'm buggered if I can find it.

Regards,

Nick

Share this post


Link to post
Share on other sites
change
Make payments with PayPal - it's
to
Make payments with PayPal - it\'s

Share this post


Link to post
Share on other sites
Put this under the return input field ok.

<input type="hidden" name="rm" value="2">

Share this post


Link to post
Share on other sites
[quote author=nickholt1972 link=topic=106411.msg425569#msg425569 date=1157054505]
thanks sasa.

I need to get myself a finer toothcomb I think.

Regards.
[/quote]You just need a text editor with highlighting, as you can see on this board - it helps :)

Share this post


Link to post
Share on other sites
If you want a free PHP IDE to develope your PHP scripts with get phpdesigner 2006 (only for windows)

Share this post


Link to post
Share on other sites

×

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.