PHP paypal buy it now button not working at GoDaddy

Discussion in 'PHP' started by JLEville, Aug 13, 2008.

  1. #1
    For some reason this code will not work on GoDaddy. I've tried it at a different host and it works fine.

    <?
    echo '<html>
    <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
    <input type="hidden" name="cmd" value="_xclick">
    <input type="hidden" name="business" value="workingemail@workingsite.com">
    <input type="hidden" name="item_name" value="' . $products . '">
    <input type="hidden" name="amount" value="' . $price . '">
    <input type="hidden" name="no_shipping" value="2">
    <input type="hidden" name="no_note" value="1">
    <input type="hidden" name="currency_code" value="USD">
    <input type="hidden" name="bn" value="IC_Sample">
    <input type="submit" name="submit" value="Confirm Purchase">
    </form>
    </html>';
    ?>
    PHP:
    The $products and $price variables are set correctly so that's not the problem. Any help would be greatly appreciated. This is really frustrating me. Thanks!
     
    JLEville, Aug 13, 2008 IP
  2. Mystique

    Mystique Well-Known Member

    Messages:
    2,579
    Likes Received:
    94
    Best Answers:
    2
    Trophy Points:
    195
    #2
    GoDaddy is a sort of hosting for newbies because of its many limitations and annoyance preventing people to play with certain chunks of code or features.

    I would suggest:

    1. Read the hosting manuals at GoDaddy for an answer to your specific problem.
    2. Whatever is related to your business don't put it into GoDaddy but those other servers you have tried or switch to Servage, $6.45 a month, free domain for life, tons of features and a special coupon code you can take advantage of (found in my signature below) www.servage.net
     
    Mystique, Aug 13, 2008 IP
  3. is0is0

    is0is0 Peon

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If any of Mystique's suggestions are unsucessful you could always contact support and inquire about it.
     
    is0is0, Aug 13, 2008 IP
  4. Kaizoku

    Kaizoku Well-Known Member

    Messages:
    1,261
    Likes Received:
    20
    Best Answers:
    1
    Trophy Points:
    105
    #4
    Try wrapping your string with a " rather than a '. Then you need to escape your " with \". a " works better if it involves string concatenation.
     
    Kaizoku, Aug 13, 2008 IP
  5. JLEville

    JLEville Peon

    Messages:
    147
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks for the idea but it didn't work....I found a way around it but I am definitely going to switch hosts. Thanks to everyone who helped!
     
    JLEville, Aug 14, 2008 IP