Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- session_start();
- //writes cookie if not exist and makes session variable with same name
- function $setUTF8cookie($name, $val){
- if (!isset($_COOKIE['city'])){
- setrawcookie($name,$val);
- }
- $_SESSION[$name]= implode('',json_decode('["'.str_replace('%u','\u',$_COOKIE[$cookieName]).'"]'));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement