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
Post a Comment