Forum Moderators: coopster
Although I finally have this working fine, when they navigate to another page:
[example2.com...] (the only other fuctional page)...the cookie that had been entered into the textbox is now cleared and defaults back to the XXXXXX
Here is the cookie code that I am using (I know it is not secure, but there is no information being sent):
<?
$ccbillid = "".$_POST['ccbillinput']."";
$cookie_life = time() + 31536000;
setcookie('ccbillid', $ccbillid, $cookie_life, '/', '.example2.com');
$_COOKIE["ccbillid"] = $ccbillid;
if (!$_COOKIE["ccbillid"]){$ccbilloutput = "XXXXXX"; }
else {$ccbilloutput = $_COOKIE["ccbillid"]; }
?>
And when the variable is being called:
<? print $ccbilloutput;?>
...Any help would be great. Thanks in advance.
[edited by: ergophobe at 2:47 am (utc) on July 10, 2005]
[edit reason] no personal URLs please - see site Usage Agreement [/edit]
if(isset($_COOKIE['ccbillinput']) $ccbillid = $_COOKIE['ccbillinput'];
if(isset($_POST['ccbillinput']) $ccbillid = $_POST['ccbillinput'];
;)