MYSQL and PHP Need to add echo to a table on same page
<p>I need to add an echo on a php page to a table i created on the same page to cross insert it onto a different SQL DB</p>

<p>The following is my code</p>

<pre><code>&lt;?php
$con = mysql_connect("localhost","****","****");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("****", $con);

$result = mysql_query("SELECT * FROM members
WHERE member_msisdn='$slusername'");
echo "&lt;table border='1'&gt;
&lt;tr&gt;
&lt;th&gt;Membership&lt;/th&gt;
&lt;th&gt;Number&lt;/th&gt;
&lt;th&gt;Registration Date&lt;/th&gt;
&lt;th&gt;End Date&lt;/th&gt;
&lt;th&gt;Copy of ID&lt;/th&gt;
&lt;/tr&gt;";
while($row = mysql_fetch_array($result))
 {
echo "&lt;td&gt;&lt;center&gt;" . $row['member_id'] . "&lt;/td&gt;";   
echo "&lt;td&gt;&lt;font color=blue&gt;" . $row['member_msisdn'] . "&lt;/td&gt;";
echo "&lt;td&gt;&lt;center&gt;" . $row['asdate'] . "&lt;/td&gt;";
echo "&lt;td&gt;&lt;center&gt;" . $row['aedate'] . "&lt;/td&gt;";
echo "&lt;td&gt;&lt;center&gt;" . $row['attid'] . "&lt;/td&gt;";
echo "&lt;/tr&gt;";
  }
echo "&lt;/table&gt;";

mysql_close($con);
?&gt;&lt;/div&gt;
        &lt;div class="Notes"&gt;&lt;strong&gt;&lt;br&gt;
          Emergency Contact Numbers:&lt;/strong&gt;&lt;br&gt;
          &lt;?php
$con = mysql_connect("localhost","****","****");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("****", $con);

$result = mysql_query("SELECT * FROM members a INNER JOIN recipients b ON a.member_id =     
b.member_id WHERE member_msisdn=$slusername");
echo "&lt;table border='1'&gt;
&lt;tr&gt;
&lt;th&gt;Number&lt;/th&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Surname&lt;/th&gt;
&lt;/tr&gt;";
while($row = mysql_fetch_array($result))
 {
echo "&lt;td&gt;&lt;font color=blue&gt;" . $row['recipient_msisdn'] . "&lt;/td&gt;";
echo "&lt;td&gt;" . $row['recipient_name'] . "&lt;/td&gt;";
echo "&lt;td&gt;" . $row['recipient_surname'] . "&lt;/td&gt;";
echo "&lt;/tr&gt;";
  }
echo "&lt;/table&gt;";

mysql_close($con);
?&gt;
        &lt;/div&gt;
        &lt;p&gt;
          &lt;label for="member_id"&gt;&lt;/label&gt;
          &lt;input type="text" name="member_id" id="member_id"&gt; // here i need the    
member_id of members to be printed so i can have it entered into another table on same    
sql DB
        &lt;/p&gt;
       &lt;p&gt;&lt;br&gt;
        &lt;/p&gt;
      &lt;/div&gt;&lt;/td&gt;
</code></pre>

<p>Basically on the top section i echo the member_id but i need it to be inputed in the table member_id by itself and then by action placed on the SQL DB</p>
