Hi
I am building a simple shopping cart and working on the shipping fees. In a previous page, I obtain the customer's address and pass on the value $Postcode through the form. Next, I use the mb_substr function to check the first 4 characters of the postcode. If the value of $postcode1 is SE22, then delivery is free, otherwise I will charge £3. However, the code below doesn't seem to work. Where am I going wrong?
Mayan
// check if eligible for free delivery
$postcode1 = mb_substr($Postcode,0,4);
if($postcode != "SE22" ){
$delivery = 3;
} else {
$delivery = 0;
}