2025-09-29_creating a session in php
// check if php session has started // 1. first and best method if(session_id() == '') session_start(); // if session is not started, session id will be empty. // 2. second method if(!isset($_SESSION)) session_start(); // if session is not set it should be started. // 3. Third method if( !defined( 'SID' ) ) session_start(); // start session if session id is not defined.
Comments
0 B
|👍
/👎
0 B
|👍
/👎
0 B
|👍
/👎
0 B
|👍
/👎
0 B
|👍
/👎
0 B
|👍
/👎
0 B
|👍
/👎
0 B
|👍
/👎
0 B
|0 👍
/0 👎