$_POST variable is duplicating
<p>I do not even know how to google this one...imagine it is something stupid...but any help would be great...</p>

<p>passing a variable when submitting a form...when echo the $_POST it is good...but when i put it into a php variable it is duplicated</p>

<pre><code> &lt;?

 //list transactions by month
 if ($_POST['m']=="yes"){
 $table = $_POST['month'];
 $_SESSION['table']=$_POST['month'];

 $conn = mysql_connect("localhost", "mss_records", "3205") or die(mysql_error());
 mysql_select_db('store_records', $conn) or die(mysql_error());

 $result = mysql_query("SELECT * FROM $table");

 while($row = mysql_fetch_array($result))
 {
 $id=$row['transaction'];
 $date=$row['date'];
 $time=$row['time'];
 $paid=$row['payment'];
 $total=$row['total'];
 echo '&lt;style type="text/css"&gt;
 &lt;!--
 .list {
 font-family: Georgia, "Times New Roman", Times, serif;
 font-size: 12px;
 color: #000;
 padding: 2px;
 border: 2px solid #009;
 }
 .view {
 width: 100px;
 }
 --&gt;
 &lt;/style&gt;
 &lt;div class="list"&gt;
 &lt;p&gt;&lt;span style="color: #900"&gt;Transaction #&lt;/span&gt;'.$id.'
 &lt;span style="color: #900"&gt;Date:&lt;/span&gt;'.$date.'
 &lt;span style="color: #900"&gt;Time:&lt;/span&gt;'.$time.'&lt;span style="color: #900"&gt;
 Paid By:&lt;/span&gt;'.$paid.' &lt;span style="color: #900"&gt;Total:&lt;/span&gt;'
 .number_format($total, 2).'
 &lt;form name="form1" method="post" action="find.php"&gt;
 &lt;label&gt;
 &lt;input type="submit" name="view" id="view" value="'.$id.'"&gt;
 &lt;/label&gt;
 &lt;/form&gt;
 &lt;/p&gt;
 &lt;/div&gt;
 &lt;p&gt;&lt;/p&gt;';
 }
 }
 //view transaction after viewing by month
 if (isset($_POST['view'])){


 $conn = mysql_connect("localhost", "mss_records", "3205") or die(mysql_error());
 mysql_select_db('store_records', $conn) or die(mysql_error());

 $table = $_SESSION['table'];
 echo "this is the number  ".$_POST['view'];
 $post=$_POST['view'];
 echo "this is the post   ".$post;
 $result = mysql_query("SELECT * FROM $table WHERE transaction = '$post'")
 or die(mysql_error());

 while($row = mysql_fetch_array($result))
 {    
 $items=$row['transaction'];
 }
 echo $items;  
 }
 ?&gt;
</code></pre>

<p>after the user goes through the first selection and on the second window the output is...</p>

<pre><code>this is the number 46this is the $post 4646 
</code></pre>
