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.
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.
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)
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):