I have a restuarant page that receive orders. I want the page never lose the restaurant ID. Other page the read the orders from database need the restaurant ID.
I tried already set timeout for SESSION, it works if the page is open all the time but customers sometimes need to close the browser or open other pages and it lose the SESSION. Maybe the other option is to use COOKIES but I think it is not safe or maybe I am not need it.
$session_lifetime = 3600 * 24 * 200; // 200 days
session_set_cookie_params ($session_lifetime);
session_start();
$RID = $_SESSION['rid'];
It still lose the $RID SESSION. What I expected is that this SESSION never expire unless user logout.