title: PHP - Send an array from the first page and get it on the second page
body: <p>I'm trying to send an array with its values from the first page to the second page. On the second page what I want to happen is that it the sent array values will be transferred to a new array. <strong>Here's my current progress:</strong> </p>
  
  <blockquote>
    <p>Snippet code of <strong><code>Report_Status.php</code></strong> (First Page / Source, where the
    array with values is initailized)</p>
  </blockquote>
  
  <pre><code>$message = array(
              'title' =&gt; 'Report Approved!',
              'body' =&gt; 'Thank you for reporting! We already approved/verified your report as a legit fire incident. Wait for the firefighters to arrive.'
          );
          while ($User_Row = mysqli_fetch_array($Retrieve_User, MYSQLI_ASSOC)){
              $User_Token[] = $User_Row['User_Token'];
          }
         send_notification($User_Token, $message); //calling a function of the second page. 
  //I will replace the it from calling a function to redirecting to a specific web link
  </code></pre>
  
  <blockquote>
    <p>This first page retrieves a specific data (which is the user's token) from the database and stores it into an array (<code>$User_Token[]</code>). Initialization.</p>
    
    <p>Snippet code of <strong><code>Push_User_Notification.php</code></strong> (Second page / Destination, where the array with its values will be received.</p>
  </blockquote>
  
  <pre><code>//Here: there should be the code for catching/receving the array
  $Retrieve_Target_Tokens_Query = "SELECT * FROM User WHERE User_Token = $tokens";
  $Retrieve_Target_Tokens = mysqli_query($Connection, $Retrieve_Target_Tokens_Query);
  $tokens = array();
  
  if(!$Retrieve_Target_Tokens){
      echo "&lt;script type = 'text/javascript'&gt; alert('Server Error: Could retrieve tokens from database because of this error: ". mysqli_error($Connection)."') &lt;/script&gt;";
  }
  
  if(mysqli_num_rows($Retrieve_Target_Tokens) &gt; 0){
      while($Token = mysqli_fetch_array($Retrieve_Target_Tokens)){
          $tokens[] = $Token['User_Token'];
      }
  }
  $message = array("message" =&gt; "Your Report has been approved by an admin! Please wait for firefighter/s to arrive.");    
  send_notification($tokens, $message);
  
  function send_notification ($tokens, $message)
  {
  //Process of Firebase sending notification here (No problem on this function)
  }
  </code></pre>
  
  <p><strong>Question:</strong></p>
  
  <ol>
  <li>How can i send an array from a one page and receive it successfully to another page?</li>
  </ol>
  
  <p>P.S. This code/s sends a push notification to specific android users only.</p>