title: Getting the $_SESSION empty after filling with data from DB
body: <p>I'm making an integration between two apis, what the api makes is to take information from one site to add it in another site in one way api conection. 
  As a first step the program should enter to the PART1 of the view.php file, then is comes to the fill.php I insert some information to the database and then fill the $_SESSION with some information.</p>
  
  <p>fill.php</p>
  
  <pre><code>        try{
              $DB_ = new PDO("mysql:host={$GLOBALS['db_host']};dbname=$GLOBALS['database']};
          charset=utf8",$GLOBALS['db_user'],$GLOBALS['db_password']);
  
          $query = $DB_-&gt;query("INSERT into users (User1, 
          Pass1, User2, Pass2, status) VALUES 
           ('".$GLOBALS['User1']."', '".$jsonResponse["Pass1"]."', 
           null, null, 1)");
  
          if(is_numeric($DB_-&gt;lastInsertId()) == TRUE){
              $_SESSION['ID'] = $DB_-&gt;lastInsertId();
              $_SESSION['User1'] = $GLOBALS['User1'];
              $_SESSION['Pass1'] = $jsonResponse["Pass1"];
              $DB_ = null;
          }else{
              echo "Las variables de sesion no fueron seteadas correctamente";
              $DB_ = null;
          }
  
      }catch(PDOException $e) {
          echo "Ha ocurrido un error al momento de insertar una información.";
          die();
      }
  </code></pre>
  
  <p>Then I come back again to view.php and I should enter to the PART 2 of the view because now the $_SESSION['ID'] is set with some numeric value. But it's not working on Chrome, for some reason in Edge and Firefox works bus in chrome it is not.</p>
  
  <p>view.php</p>
  
  <pre><code>  &lt;?php 
          if(!isset($_SESSION['ID'])){   //PART 1
                  echo '&lt;div class="alert alert-warning"&gt; 
                          &lt;strong&gt;its not sync, click over here &lt;/strong&gt;&lt;a class="green-link" href="./create-account.php" target="_blank"&gt; CLICK.&lt;/a&gt;
                       &lt;/div&gt;';
  
              }
          ?&gt;
          &lt;div id="status-message"&gt;
              &lt;!-- Contenido cargado a través de javascript --&gt;
          &lt;/div&gt;
          &lt;?php 
              if(isset($_SESSION['ID'])){  //PART 2
                  echo '&lt;div class="alert alert-warning"&gt;
                          &lt;strong&gt;Its sync now&lt;/strong&gt; &lt;a class="green-link" href="https://'.$_SESSION['someurl'].'" target="_blank"&gt; CLICK&lt;/a&gt;
                       &lt;/div&gt;';
              }
          ?&gt;
  </code></pre>