How to update variables while page in Infinite loop in PHP?
I have something like this :

    <?php
      $perform_check = 1; #Checks data with ID : 1
      while(true)
      {
        #code
      }
    ?> 

*But some data must be updated in this process, is it possible to update this data from another document?*

I tried something like this :

**index.php**

    <?php
      setcookie("data", 19, time()+3600);
    ?>
and

**loop.php**

    <?php
      while(true)
      {
        if($perform_check!=$_COOKIE[data]) $perform_check = $_COOKIE[data];
        #rest of code
      }
    ?>

But it doesn't work. I also tried `$_SESSION` but the page crashes on `session_start()`.

Is it somehow possible?


How to update variables while page in Infinite loop in PHP?
===

I have something like this :

    <?php
      $perform_check = 1; #Checks data with ID : 1
      while(true)
      {
        #code
      }
    ?> 

*But some data must be updated in this process, is it possible to update this data from another document?*

I tried something like this :

**index.php**

    <?php
      setcookie("data", 19, time()+3600);
    ?>
and

**loop.php**

    <?php
      while(true)
      {
        if($perform_check!=$_COOKIE[data]) $perform_check = $_COOKIE[data];
        #rest of code
      }
    ?>

But it doesn't work. I also tried `$_SESSION` but the page crashes on `session_start()`.

Is it somehow possible?

