I was wondering if it is possible to check if a session variable is empty and if it is, to set it to something. For example, I have a checkout form where the buyer has the option to set a separate shipping address from their billing address. I want the shipping address to be set as the billing address if they are the same. Here’s what I’ve tried, but it doesn’t seem to be working:
[code=php]
if ($_SESSION[‘shipping_address’] = ”)
{
$_SESSION[‘shipping_address’] = $_REQUEST[‘billing_address’];
}
Is there something completely wrong with what I’m doing? Any help is always appreciated! I’m still learning, so I’m sorry if this is an obvious issue!