PHP Order Button Problem....

by esr
3 replies
I'm trying to hook up a custom order button to a Paypal button I created.

I don't know ANYTHING about PHP coding. I have a button on the page. The reader clicks on that button, which points to a page on my server labeled "order.php" and in THAT page, it had this code:

?php
header ("Location: ORDER BUTTON HERE");
?

I've left out the "greater than" and "less than" symbols so it would show up on this forum.

So, were it says ORDER BUTTON HERE, I pasted the code I got when I created my Paypal button.

Now, when I click on the custom button, I get this error message:

Parse error: syntax error, unexpected T_STRING in /home/ppcforbe/public_html/videos/order.php on line 2

Can anyone tell me how to connect a custom order button to go straight to Paypal to order?

Thanks.
#button #order #php #problem
  • Profile picture of the author mywebwork
    Hi esr

    The PHP "header" function redirects your page to another URL. You can't use it with your PayPal button code directly.

    PHP: header - Manual

    In your case one simple solution would be to look at your saved button code in PayPal and take the "email" code it generates, i.e. the link you would use if you were to embed your payment link into an e-mail. Use that link in place of the "ORDER BUTTON HERE" in you r example code. That should do the trick.

    If you need any help with this please let me know.

    Bill
    {{ DiscussionBoard.errors[1746310].message }}
  • Profile picture of the author esr
    Thank you, thank you, thank you Bill!! It worked beautifully! Thanks so much!!
    Signature
    Free Report > > > > > "Backdoor Blog Promotion"
    Quickly increase your site traffic, and your profits, with this free top secret promotion tool. http://www.theblogbuilder.org
    "If you don't take effective action, you're robbing yourself of the life you really want."
    {{ DiscussionBoard.errors[1746329].message }}

Trending Topics