I used session_start() to initiate a session in PHP, but when my browser closes, the session is gone.
How do I use PHP to create persistent sessions tha
You can start your session without typing session_start() and you can start it with cookie like this
setcookie('PHPSESSID','any id' , any time);
this could be done because when you type session_start() and then try to look the cookie like this
print_r($_COOKIE);
then the outpout will be :
Array ( [PHPSESSID] => c0voj7h0b4aesddkc17a6jk7c3 )
just try it yourself