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