Welcome Guest, Not a member yet? Register   Sign In
cookies and CI4
#3

Haven't looked at the code for set_cookie, so can't tell why that's not working.
But for setting the cookie with setCookie() you can do like this, so you can set multiple.

PHP Code:
public function myFunction()
{
    
$this->request->setCookie([
        
'name' => 'user4',
        
'value' => 'value4',
        
'expire' => time() + 6000
    
]);
    
    return 
$this->myFunctionOK($user);

Reply


Messages In This Thread
cookies and CI4 - by kristianlake - 07-14-2020, 06:19 AM
RE: cookies and CI4 - by kristianlake - 07-14-2020, 10:21 AM
RE: cookies and CI4 - by jreklund - 07-14-2020, 12:12 PM
RE: cookies and CI4 - by kristianlake - 07-14-2020, 01:06 PM
RE: cookies and CI4 - by GeorgeBunzi - 12-22-2021, 09:22 PM
RE: cookies and CI4 - by kenjis - 12-22-2021, 11:16 PM
RE: cookies and CI4 - by paulbalandan - 12-22-2021, 11:37 PM
RE: cookies and CI4 - by InsiteFX - 12-23-2021, 02:18 AM
RE: cookies and CI4 - by kenjis - 12-23-2021, 03:58 AM



Theme © iAndrew 2016 - Forum software by © MyBB