Got a couple of errors on a little script I'm trying to write. The error messages are:
The function that's causing the trouble is:
Line #25 is the line that starts with $_COOKIE and line #28 is the return line.
Any help would be greatly appreciated!
Code:
Warning: Illegal offset type in /home/poison1/public_html/wp-content/themes/thesis_17/custom/custom_functions.php on line 25 Warning: setcookie() expects parameter 1 to be string, object given in /home/poison1/public_html/wp-content/themes/thesis_17/custom/custom_functions.php on line 28
Code:
function setcookielive($name="Believe_Adwords", $value=1, $expire=0, $path="/", $domain=".nickholliday.com", $secure=false, $httponly=false) {
//set a cookie as usual, but ALSO add it to $_COOKIE so the current page load has access
$_COOKIE[$name] = $value;
$expire=time()+3888000;
$value=$_GET['gclid'];
return setcookie($name,$value,$expire,$path,$domain,$secure,$httponly);
}
Any help would be greatly appreciated!
Comment