PHP Cookies works well on localhost, but it's not working on server -


i facing problem setcookie(), working fine on localhost not on server, issue happened when changed unicode webpages , database utf-8. following snippet of code:

if(isset($_get['langid'])) {          $langid = $_get['langid'];          setcookie('langid', $langid);      }      elseif  (isset($_cookie['langid'])) {         $langid = $_cookie['langid'];          echo $_cookie['langid'];     }     else {         $langactive=mysql_query("select * languages id=2 , active=2");         $langactive=mysql_fetch_array($langactive);             if (empty($langactive)){ $langid = 0;}             else{ $langid = 2; } } 


Comments

Popular posts from this blog

iOS: Performance of reloading UIImage(name:...) -

How to prevent logback from emitting repeated "Empty watch file list. Disabling" messages -

c# SetCompatibleTextRenderingDefault must be called before the first -