Jump to content

bsamson

Members
  • Posts

    150
  • Joined

  • Last visited

Everything posted by bsamson

  1. Hello. I am having a heck of a time figuring this one out. I have an array (output below) with info loaded. Everytime I run this, the output a blank page, no errors. Just curious, am I missing something? Thanks in advance for any help. print_r ($tmp_errors) output: Array ( [0] => cust_add1 ) <?php $styleForErrorBoxes = "style='border: 1px solid #FF0000'"; $tmp_errors = unserialize($result[0]['tmp_errors']); if ($tmp_errors) { if (array_key_exists('cust_email', $tmp_errors)) { $err_cust_email = $styleForErrorBoxes; } if (array_key_exists('cust_phone', $tmp_errors)) { $err_cust_phone = $styleForErrorBoxes; } if (array_key_exists('cust_first', $tmp_errors)) { $err_cust_first = $styleForErrorBoxes; } if (array_key_exists('cust_last', $tmp_errors)) { $err_cust_last = $styleForErrorBoxes; } if (array_key_exists('cust_add1', $tmp_errors)) { $err_cust_add1 = $styleForErrorBoxes; } if (array_key_exists('cust_add2', $tmp_errors)) { $err_cust_add2 = $styleForErrorBoxes; } if (array_key_exists('cust_city', $tmp_errors)) { $err_cust_city = $styleForErrorBoxes; } if (array_key_exists('cust_state', $tmp_errors)) { $err_cust_state = $styleForErrorBoxes; } if (array_key_exists('cust_zip', $tmp_errors)) { $err_cust_zip = $styleForErrorBoxes; } } echo $err_cust_add1; ?>
  2. THANK YOU SO MUCH @Guru!!!
  3. I'm running into some issues with cookies and after reading the documentation, I am still very confused on why the following code produces this output. Why is the cookie not deleted by using the second setcookie function? Any help is GREATLY appreciated. Code: <?php setcookie(custID, "Brian", time()+7200, "/"); echo "Cookie Value: ".$_COOKIE["custID"]."<br>"; setcookie(custID, "", time()-7200, "/"); echo "Cookie Value: ".$_COOKIE["custID"]; ?> Result: Cookie Value: Brian Cookie Value: Brian
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.