For some reason, I can't get this to work, and also if there is a better way to be doing this, please share :)
<?php $or->billing['street_address'] = "123 Nowhere St"; $or->billing['city'] = "Somewhere"; $or->billing['postcode'] = "92702"; $or->billing['state'] = "CA"; $or->shipping['street_address'] = "123 Nowhere St"; $or->shipping['city'] = "Somewhere"; $or->shipping['postcode'] = "92702"; $or->shipping['state'] = "CA"; ?> Billing: <a href="...&street=<?php echo $or->billing['street_address']?>&where=<?php echo $or->billing['postcode']?>"> <?php echo $or->billing['street_address'].', ' .$or->billing['city'].', ' .$or->billing['state']. ' ' .$or->billing['postcode']; ?></a> Shipping: <a href="...&street=<?php echo $or->shipping['street_address']?>&where=<?php echo $or->shipping['postcode']?>"> <?php echo $or->shipping['street_address'].', ' .$or->shipping['city'].', ' .$or->shipping['state']. ' ' .$or->shipping['postcode']; ?></a> <?php if ($or->billing['street_adddress'] == $or->shipping['street_address'] ) { echo "Billing/Shipping Match"; } elseif ($or->billing['postcode'] == $or->shipping['postcode']) { echo "ZIP codes Match"; } else { echo "Different Billing/Shipping ZIP codes"; } ?> Not sure why it doesn't recognize that what should be echoed is "Billing/Shipping Match", not "ZIP codes Match". Any help you can provide would be much appreciated!
And I have already tried adding something like
&& ($or->billing['street_adddress'] != $or->shipping['street_address']) to the elseif, it still didn't work (from here)
Anyone have any ideas? Oh, and I edited the URL's just so it's cleaner but it's linking to whitepages.com. Just want to check to see if the customers billing and shipping address match.