Hi all,
Im editting a whois script so when it returns the details of the whois search it returns one positive answer if the "loggedin" cookie is found, and another positive answer if it is not, and a negative one if the domain is taken. The whois script works fine but checking for the cookie does not.
It goes like this:
1) home page
www.example.com/index.php ---> (submit whois form (form action is step 2))
2) home page whois form action
www.example.com/whois/whois.php
require_once("AjaxWhois.php");
$whois = new AjaxWhois();
$domainName = (isset($_POST)) ? $_POST : '';
$whois->processAjaxWhois();
3) required file within whois form action
www.example.com/whois/ajaxwhois.php
//whois processing has already been done.
//if domain is available....
if ($this->checkDomain($domain,$server,$findText))
{
//check for cookie
if (isset($_COOKIE['loggedin']))
{
//and echo 'logged in message'
echo "domain available. You are logged in.";
}
else
{
//else echo 'not logged in message'
echo "domain available. You are not logged in.";
}
}
//unless domain is not available, echo 'not available message'
else {echo "Domain not available.";}
}
The script always returns the 'you are not logged in' message even through the cookie is definately written. any ideas why?