July 15, 2022 PHP / Wordpress Set and get cookies without refreshing page. Posted by toihid setcookie('cookie_id', $cookie_value, time() + (86400 * 13)); $_COOKIE['cookie_id'] = $cookie_value;