Please help - new to PHP and stuck

Hello all

I was wondering if someone could help me - please see the code below. The first part of the code works, but where it references ‘Coasters’ it won’t work at all. I’m not sure if it should be rewritten to elseif etc? Any help or advice would be hugely appreciated!

Thanks (code below)

Laura

[php]

<?php echo $record['title'] ?>


<?php echo $record['collection'];?>

<?php if($record['size'] == "Mug"){ ?>This image is wrapped around the whole mug

If ordering 4 or more mugs please contact us on 07979351802 to arrange a discount on delivery

<?php };?>
<?php if($record['size'] != "Mug"){ echo $record['size'] . '
'; }?>
<?php if($record['size'] == "Coaster"){ ?>Dimensions: 9 x 9cm. If ordering 4 or more please

contact us on 07979351802 to arrange discount on delivery.

<?php };?>
£<?php echo number_format($finalcost, 2, '.', '');?> (Inc £<?php echo $shippingCost ?> Postage and Packing)

Add To Cart


[/php]

Change into else if won’t matter. You need to check your data when your expecting it to be coaster and make sure that coaster is in it before you try to use it.

If there is a problem, it is before the code you posted

Sponsor our Newsletter | Privacy Policy | Terms of Service