title: Safari browser not handling cookie - PHP
body: <p>I am stuck on this problem for the last two days,
  I Have the following code in my main "login.php" file
  Which is running in all browsers without any problem, but not in "Safari".</p>
  
  <pre><code> if(isset($_SESSION["del_log"]) &amp;&amp; !empty($_SESSION["del_log"]) &amp;&amp; isset($_SESSION["user_type"]) &amp;&amp; !empty($deal_type)){
  
              $expire=time()+60*60*24*365;
              setcookie("del_log",$_SESSION["del_log"], $expire, '/');
              setcookie("user_type", $_SESSION["user_type"], $expire, '/');
  
      echo "&lt;script&gt;window.location.href=\"http://www.sample.com/foldername/index.php\"&lt;/script&gt;";
          }
  </code></pre>
  
  <p>i am checking these cookies in ".../foldername/index.php" file as:</p>
  
  <pre><code> if (isset($_COOKIE["del_log"]) &amp;&amp; !empty($_COOKIE["del_log"])){
       $log=$_COOKIE["del_log"];
       $user_type=$_COOKIE["user_type"];
   }else{
       echo "&lt;script&gt;window.location.href=\"http://www.sample.com/\"&lt;/script&gt;";
   }
  </code></pre>