how to use $_POST to post a php variable
<p>I have a php variable "echo $id". Now I want to use the $_POST method to post the variable. I just want to know how to do this for a variable because $_POST[$id] does not work? I want the $id to be posted from the form into another page.</p>

<p>Below is my function where the $id is in:</p>

<pre><code>function id_generator(){ 

          $id = ""; 
          $a = array( "A" , "B"); 

      for( $i = 0 ; $i &lt; 3 ; $i++ ){ $r = rand( 0 , 25 );
       $id .= $a[ $r ]; 

   }

   return $id;
}
</code></pre>

<p>Below is the form:</p>

<pre><code>         &lt;form action="QandATable.php" method="post" id="sessionForm"&gt;
         &lt;p&gt;&lt;strong&gt;1: Your Session ID: &lt;/strong&gt;&lt;?php echo $id; ?&gt;&lt;/p&gt;
&lt;/form&gt;
</code></pre>

<p>Thanks</p>
