title: Setting Multiple Cookies in PHP
body: <p>Thanks for helping with this. </p>
  
  <p>I have a script that checks logins and then sets some cookies. There are 4 cookies that are being set, (later I will probably move some to server session but for now I am using cookies. </p>
  
  <p>The issue that I am having is that only the first 2 of the 4 are being set before the rest of the script is being executed. Can anyone see why?</p>
  
  <pre><code>// If there is a row, and only 1 row, then the details are correct. Set the cookie and re-direct
              $row = mysqli_fetch_array($data);
  
              setcookie('user_id', $row['User_ID'], time()+ (60*15),"/");
              setcookie('user_name',  $row['UserName'], time()+ (60*15),"/");
              setcookie('access_Level', $row['Access_Level'], time()+ (60*15),"/");
              setcookie('db_con', $row['Db_Con'], time()+ (60*15),"/");
  
              $home_url = $link . "application/views/Dashboard.php";
              header('Location: ' . $home_url);
  </code></pre>