No cookis are being stored when i submit form
I am using a PHP page and trying to save contact information using the "remember me" checkbox functionality. I followed the gsg doc but no cookie is being saved when i submit the form. I check my browser's cookies and they are not in the list. I will post my code below, maybe you can find the fault? Thanks.
i have the bindings set for each field and the server behaviors to set each field.
the form is much longer so i will just paste the code that pertains to the cookies:
THE PHP:
if ((((isset($_POST["rememberMe"]))?$_POST["rememberMe"]:"") != "")) {
setcookie("contactName", "".((isset($_POST["contactName"]))?$_POST["contactName"]:"") ."", time()+(60*60*24*30), "/onlinereferral", "http://sandbox2.dev.web", 0);
}
if ((((isset($_POST["rememberMe"]))?$_POST["rememberMe"]:"") != "")) {
setcookie("contactEmail", "".((isset($_POST["contactEmail"]))?$_POST["contactEmail"]:"") ."", time()+(60*60*24*30), "/onlinereferral", "http://sandbox2.dev.web", 0);
}
if ((((isset($_POST["rememberMe"]))?$_POST["rememberMe"]:"") != "")) {
setcookie("contactPhone", "".((isset($_POST["contactPhone"]))?$_POST["contactPhone"]:"") ."", time()+(60*60*24*30), "/onlinereferral", "http://sandbox2.dev.web", 0);
}
if ((((isset($_POST["rememberMe"]))?$_POST["rememberMe"]:"") != "")) {
setcookie("physicianName", "".((isset($_POST["physicianName"]))?$_POST["physicianName"]:"") ."", time()+(60*60*24*30), "/onlinereferral", "http://sandbox2.dev.web", 0);
}
if ((((isset($_POST["rememberMe"]))?$_POST["rememberMe"]:"") != "")) {
setcookie("remember", "1", time()+(60*60*24*30), "/onlinereferral", "http://sandbox2.dev.web", 0);
}
THE FORM FIELDS:
<input name="contactName" type="text" class="input" id="contactName" value="<?php echo((isset($_COOKIE["contactName"]))?$_COOKIE["contactName"]:"") ?>" size="30" />
<input name="contactEmail" type="text" class="input" id="contactEmail" value="<?php echo((isset($_COOKIE["contactEmail"]))?$_COOKIE["contactEmail"]:"") ?>" size="40" />
<input name="contactPhone" type="text" class="input" id="contactPhone" value="<?php echo((isset($_COOKIE["contactPhone"]))?$_COOKIE["contactPhone"]:"") ?>" size="15" />
<input <?php if (!(strcmp(((isset($_COOKIE["remember"]))?$_COOKIE["remember"]:""),1))) {echo "checked=\"checked\"";} ?> name="rememberMe" id="rememberMe" type="checkbox" size="30" />
<input name="physicianName" type="text" class="input" id="physicianName" value="<?php echo((isset($_COOKIE["physicianName"]))?$_COOKIE["physicianName"]:"") ?>" size="30" />