How Box color will change after Paypal Payment?

Discussion in 'PHP' started by solutions.50webs.com, Jul 4, 2012.

  1. #1
    There is a square box with green color. I want to change the square box color to red after payment with paypal/cc..? How it will work? May I know the Steps to follow or do u show me an example with script?

    Waiting for your replies.

    Thanks.
     
    solutions.50webs.com, Jul 4, 2012 IP
  2. NetStar

    NetStar Notable Member

    Messages:
    2,471
    Likes Received:
    541
    Best Answers:
    21
    Trophy Points:
    245
    #2
    Not sure if I'm following you but if the "square box" which is green is an HTML element you can use CSS to change the color.
     
    NetStar, Jul 4, 2012 IP
  3. atxsurf

    atxsurf Peon

    Messages:
    2,394
    Likes Received:
    21
    Best Answers:
    1
    Trophy Points:
    0
    #3
    use Firefox "Firebug" addon to determining the path to your box element, then change its color property using javascript (not sure why is it in php section)
     
    atxsurf, Jul 4, 2012 IP
  4. RogueCZzzz

    RogueCZzzz Greenhorn

    Messages:
    9
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    13
    #4
    Hi,

    <?php
    
    //Select data from database $data  array;  //
    .....
    if($data['payment_done'] == 'yes'){
    	$color = 'red';
    }else{
    	$color = 'green';
    }
    ......
    ?>
    PHP:
    <div style="background-color: <?php echo $color; ?>" id="box"> 
    your box 
    </div>
    Code (markup):
     
    RogueCZzzz, Jul 6, 2012 IP
  5. extraspecial

    extraspecial Member

    Messages:
    788
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    45
    #5
    The best solution is to provide a membership so PayPal buyers will always see that green box.
     
    extraspecial, Jul 8, 2012 IP