It works I just did it, When you first write a cookie the web page needs to be refreshed
to update the cookie:
PHP Code:
// To delete cookie
//set_cookie('test', '', time()-3600);
// Create first cookie
//$data = 'TEST';
//set_cookie('test', $data, time()+3600);
//echo get_cookie('test');
// Create second cookie NOTE you need to click refresh in your browser to see it.
$data = 'TEST2';
set_cookie('test', $data, time()+3600);
echo get_cookie('test');
Those are the test steps I took when I create the updated second cookie I had to refresh my
web browser for it to show the updated cookie value.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )