setting a cookie in php
- by Jacksta
I am trying to set a cookie, whas wrong with this as I am getting an error.
Warning: setcookie() expects parameter 3 to be long, string given in /home/admin/domains/domain.com.au/public_html/setcookie.php on line 6
<?php
$cookie_name = "test_cookie";
$cookie_value = "test_string";
$cookie_expire = "time()+86400";
$cookie_domain = "localhost";
setcookie($cookie_name, $cookis_value, $cookie_expire, "/", $cookie_domain, 0);
?>
<HTM>
<HEAD>
</HEAD>
<BODY>
<h1>cookie mmmmmmm</h1>
</BODY>
</HTML>