title: Passing an array from one page to another in PHP
body: <p>I have a register form (for events) in which the number of fields input are not same. It depends upon the events. Different events limit different numbers of members for registration. So, in my <code>events</code> TABLE I've a row <code>members</code> which store the number of members.</p>
  
  <p>So,finally my registration form goes like this:</p>
  
  <pre><code>if ($row['members']&gt;1){
      echo "Hello ".$sess_name.", you can add ".($row['members']-1)." more members to register for ".$row['name']."&lt;br&gt;";
      echo "On successful registration of the event, all the team members will receive an email on their registered email ids&lt;br&gt;";
      $mem=array();?&gt;
      &lt;form action="" method="post"&gt;
      &lt;?php for ($i=1;$i&lt;$row['members'];$i++){
          echo '&lt;label&gt;Insert ID of Member '.$i.' :&lt;/label&gt;';
          echo '&lt;input type="text" id="id" size="20" name="'.$mem[].'"&gt;&lt;br&gt;';
      }
      echo '&lt;button type="submit" id="submit" value="Register" name="register1"&gt;Register&lt;/button&gt;';?&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>I'm storing the <code>ID</code> that are being input in an array(<code>$mem</code>)
  But I don't know how to pass it (<code>$mem</code>) in another page to store it in MySQL table.</p>