SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru
    Join Date
    Feb 2006
    Location
    Chepstow, South Wales
    Posts
    769
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Creating admin page for client to use paypal add to cart buttons on his site

    I am building a small admin page for my client to paste the code he has generated from paypal to use add to cart buttons next to his stock.

    All seems fine, have created the area for him to upload:

    <textarea name="paypalPath" rows="15" cols="80" style="width:100%"><? echo $paypalPath;?></textarea>

    Which seems to be working fine, as just looked in the database and the code appears as it should in the text type area as below:

    Code:
    <form target=\"paypal\" action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\">
    <input type=\"hidden\" name=\"cmd\" value=\"_s-xclick\">
    <input type=\"hidden\" name=\"hosted_button_id\" value=\"J3CPLKUBXVAC4\">
    <table>
    <tr><td><input type=\"hidden\" name=\"on0\" value=\"Size\">Size</td></tr><tr><td><select name=\"os0\">
    	<option value=\"4-7\">4-7 </option>
    	<option value=\"7-11\">7-11 </option>
    </select> </td></tr>
    </table>
    <input type=\"image\" src=\"https://www.paypalobjects.com/en_GB/i/btn/btn_cart_LG.gif\" border=\"0\" name=\"submit\" alt=\"PayPal  The safer, easier way to pay online.\">
    <img alt=\"\" border=\"0\" src=\"https://www.paypalobjects.com/en_GB/i/scr/pixel.gif\" width=\"1\" height=\"1\">
    </form>
    All good so far, so then to the page where buttons is supposes to appear:

    <div><?=$f['paypal_Path']?></div>

    Then basically it doesnt output correctly, can anyone see what I am doing wrong, as all seems proper to me.

    http://www.nicesocks.co.uk/detail.php?ID=1153

  2. #2
    SitePoint Guru
    Join Date
    Feb 2006
    Location
    Chepstow, South Wales
    Posts
    769
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK I worked it out sorry, strangely as I was stood making a cup of tea.

    Code:
    $paypalPath=mysql_real_escape_string($_POST['paypalPath']);
    Which was obviously messing up the code.

    Thanks for looking anyway


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •