how to implement PHP session manually -


i new php. want implement php session manually. on php pageload, check if cookie set. if yes, display required information, , if not, ask user enter details , display information. not allowed use php sessions. can use cookies. information needed displayed users (browsers) in session (so have save static global array). appreciated. thanks.

try this

setcookie('cookie_name', 'cookie_value', time()); echo $_cookie['cookie_name']; 

now check cookie if exists.

if(isset($_cookie['cookie_name'])) {     echo "your cookie set"; } else {     echo "return error or thing want"; } 

this give browser(s) information.

echo $_server['http_user_agent']; 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -