Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Mar 2010
    Posts
    26
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Editing Paypal Value using php

    Hi All,

    My first post here.

    I have created a cms so to speak. It uses a simple login system and ajax so that an admin can edit the text on the page, this then updates a html file that stores the text, and the actual page simply echos the html text.

    If you navigate to:

    http://moroccannatural.com/rhassoul.php

    You will see that the 7.50 price at the bottom is editable.

    When this is edited, I of course need it to update the amount value in the paypal form.

    The form is here:

    Code:
    <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post" style="float:left;padding-left:15px;">
    <input type="hidden" name="cmd" value="_cart">
    <input type="hidden" name="business" value="info@moroccannatural.com">
    <input type="hidden" name="lc" value="GB">
    <input type="hidden" name="item_name" value="Rhassoul Clay 200g">
    <input type="hidden" name="amount" value="7.50">
    <input type="hidden" name="currency_code" value="GBP">
    <input type="hidden" name="button_subtype" value="products">
    <input type="hidden" name="shipping" value="">
    <input type="hidden" name="add" value="1">
    <input type="hidden" name="bn" value="PP-ShopCartBF:btn_cart_LG.gif:NonHostedGuest">
    
    <input type="image" style="outline:none;"  src="cart.jpg" name="submit2"  onmouseover="javascript:this.src='cart2.jpg';" onmouseout="javascript:this.src='cart.jpg';">
    </form>
    Here is the php that I think you will need to help :

    Code:
    <?php
       
       $codeToBeEdited5 = file_get_contents('text5.html');   
       
       
       $idName5 = 'desc5'; 
       
    
    
       require_once('AjaxEditInPlace.inc.php');
    
       $ajaxEditInPlace = new AjaxEditInPlace($codeToBeEdited5, 'showText');
       echo $ajaxEditInPlace->getEditInPlaceCode($idName5);
    
       
    
       ?>

    I have tried lots of things such as

    [code[
    <input type="hidden" name="amount" value="<?php echo $idName5 ?> ">
    [/code]
    Please help me!

    Thanks

    Dan

  • #2
    Regular Coder
    Join Date
    Dec 2009
    Location
    UK
    Posts
    495
    Thanks
    0
    Thanked 58 Times in 58 Posts
    Note that this has already been solved:
    http://www.phpfreaks.com/forums/inde...,292487.0.html
    My site: JayGilford.com
    Resources:
    PHP Pagination Class | Getting all page links | Handling PHP Errors properly
    If you like a users help, show your appreciation with the rep and thanks buttons :)


  •  

    Posting Permissions

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