Welcome Guest, Not a member yet? Register   Sign In
Cookie not working in codeigniter 4. Need helper

(This post was last modified: 04-20-2020, 11:42 PM by Leo.)

"I just used your code in my code but not working also"

Oh, that's inconvenient. Try and set a cookie in a bare index.php page, without CI4, with PHP function

PHP Code:

if ((!empty(
$_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off')) {
    $secure true;

setcookie("Cookie_name""Cookie_value"time() + 1000'/'''$secure); 

if still not working....well then off to the internet to look for reasons why cookie not setting  Confused

P.S. also try in different browsers.
You can see things I made with codeigniter here: itart.pro its not overly impressive as I have very little time to learn.

Messages In This Thread
RE: Cookie not working in codeigniter 4. Need helper - by Leo - 04-20-2020, 10:26 PM

Theme © iAndrew 2016 - Forum software by © MyBB