Jump to content


Photo

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


  • Please log in to reply
6 replies to this topic

#1 nickholt1972

nickholt1972
  • Members
  • PipPipPip
  • Advanced Member
  • 30 posts
  • LocationBury, Lancs, UK

Posted 31 August 2006 - 07:45 PM

The following HTML code works fine in an HTML document. I've added a <?php echo ' at the beginning and an '; ?> 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


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

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

Regards,

Nick
Nick Holt - Future Guru

#2 sasa

sasa
  • Staff Alumni
  • Advanced Member
  • 2,804 posts
  • LocationHrvatska

Posted 31 August 2006 - 07:58 PM

change
Make payments with PayPal - it's
to
Make payments with PayPal - it\'s

#3 nickholt1972

nickholt1972
  • Members
  • PipPipPip
  • Advanced Member
  • 30 posts
  • LocationBury, Lancs, UK

Posted 31 August 2006 - 08:01 PM

thanks sasa.

I need to get myself a finer toothcomb I think.

Regards.
Nick Holt - Future Guru

#4 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 31 August 2006 - 10:34 PM

Put this under the return input field ok.

<input type="hidden" name="rm" value="2">
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#5 nickholt1972

nickholt1972
  • Members
  • PipPipPip
  • Advanced Member
  • 30 posts
  • LocationBury, Lancs, UK

Posted 04 September 2006 - 11:53 AM

What will that do?
Nick Holt - Future Guru

#6 Jenk

Jenk
  • Members
  • PipPipPip
  • Advanced Member
  • 778 posts

Posted 04 September 2006 - 12:10 PM

thanks sasa.

I need to get myself a finer toothcomb I think.

Regards.

You just need a text editor with highlighting, as you can see on this board - it helps :)

#7 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 04 September 2006 - 12:24 PM

If you want a free PHP IDE to develope your PHP scripts with get phpdesigner 2006 (only for windows)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users