Creating cookie
session_start(); $params = session_get_cookie_params(); setcookie(session_name('USERNAME'),'HAMZA',1, isset($params['path']), isset($params['domain']), isset($params['secure']), isset($params['httponly'])); session_regenerate_id(true); echo "COOKIE IS CREATED SUCCESSFULLY !";
Now fetching cookie value
session_start(); $NAME=$_COOKIE['USERNAME']; echo $_COOKIE["USERNAME"]; if(isset($NAME)) { if($NAME=='USERNAME') { echo "success"; } else { echo "error"; } }
Please Help Me !
Result
Why they create Auto random Value Like: u8omuum6c9pkngrg4843b3q9m3). But i want to get my Original COOKIE value Which is "HAMZA" ?????
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With