I cannot get the following piece of code to store a cookie on my system. Everything appears to look correct but it's not working right
Im I missing something?
FUNCTION newuser()
{
//create random generatedly ID number
//check database to see if it is unique or not
//if it is unique store in database, if not rerun random generated ID
$tokenID = getCookieID();
setDefaults();
$visitData = $_SESSION['visitData'];
$query = "INSERT INTO trackingvisitor (theloopid,
firstVisit,
lastVisit,
numVisit,
totalDuration,
totalClicks)";
$query .= "VALUES('$tokenID',
$visitData[firstVisit],
$visitData[lastVisit],
$visitData[numVisit],
$visitData[totalDuration],
$visitData[totalClicks])";
$result = mysql_query($query);
setcookie("theloopid", $tokenID, time()+60*60*24*365*10, "/","xyz.com",0);
echo "<br>hello from 47 validate Login.php ".$tokenID." <br>";
return $visitData;
}
the code makes it down to my test line echo "<br>hello from 47 .....". so I know the function is working properly and the info is submitted into the database.
any suggestions will be well recv'dnevermind i found the solution...
thanks
Im I missing something?
FUNCTION newuser()
{
//create random generatedly ID number
//check database to see if it is unique or not
//if it is unique store in database, if not rerun random generated ID
$tokenID = getCookieID();
setDefaults();
$visitData = $_SESSION['visitData'];
$query = "INSERT INTO trackingvisitor (theloopid,
firstVisit,
lastVisit,
numVisit,
totalDuration,
totalClicks)";
$query .= "VALUES('$tokenID',
$visitData[firstVisit],
$visitData[lastVisit],
$visitData[numVisit],
$visitData[totalDuration],
$visitData[totalClicks])";
$result = mysql_query($query);
setcookie("theloopid", $tokenID, time()+60*60*24*365*10, "/","xyz.com",0);
echo "<br>hello from 47 validate Login.php ".$tokenID." <br>";
return $visitData;
}
the code makes it down to my test line echo "<br>hello from 47 .....". so I know the function is working properly and the info is submitted into the database.
any suggestions will be well recv'dnevermind i found the solution...
thanks