Select an sql field from html field and show it in another page
<p>I have displayed sql table in html table, made a hyperlink near all fields, when i click it the whole field details should be shows in other page(ie; i show only 2 fields of sql in the table and want to show rest in another page).</p>

<p>admin.php</p>

<pre><code>  &lt;?php
    $con= mysql_connect("localhost","root","");
    mysql_select_db("main",$con);
echo"&lt;form action=\"post\" class=\"form-horizontal\" role=\"form\"&gt;";
echo "&lt;table width='700' height='150' onclick='myFun(event)'&gt;";
echo"   &lt;tr&gt;
        &lt;td width='100' align='center'&gt;&lt;/td&gt;
        &lt;td width='100' align='center'&gt;&lt;b&gt;&lt;u&gt;NAME&lt;/u&gt;&lt;/b&gt;&lt;/td&gt;
        &lt;td width='100' align='left'&gt;&lt;b&gt;&lt;u&gt;E-MAIL&lt;/u&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    ";
 $result=mysql_query("select NAME,EMAIL from admin order by AID");
    while($row=mysql_fetch_array($result))
        {
    echo "&lt;tr&gt;";
    echo"&lt;td width='100' align='center'&gt;&lt;a href='viewadmin.php?name=".$row['NAME']."'&gt;Select&lt;/a&gt;&lt;/td&gt;";
    echo"&lt;td width='100' align='center'&gt;".$row['NAME']."&lt;/td&gt;";
    echo"&lt;td width='100' align='left'&gt;".$row['EMAIL']."&lt;/td&gt;";
    echo"&lt;/tr&gt;";
        }
echo"&lt;/table&gt;";


echo"&lt;/form&gt; ";
 ?&gt;  
</code></pre>

<p>viewadmin.php</p>

<pre><code>&lt;?php
$name = $_GET['name'];
$result=mysql_query("SELECT NAME,DOB,MOB,EMAIL, FROM admin WHERE NAME = $name");
if (false === $result) {
    echo mysql_error();
}
 else {
    $row=mysql_fetch_row($result);
}

echo" &lt;form class=\"form-horizontal\" role=\"form\"&gt;
&lt;table width='400'&gt;
    &lt;tr&gt;
        &lt;td  align='left'&gt;Name&lt;/td&gt;
        &lt;td align='left'&gt;".$row['NAME']."&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td align='left'&gt;E-mail&lt;/td&gt;
        &lt;td align='left'&gt;".$row['EMAIL']."&lt;/td&gt;
    &lt;/tr&gt;   

    &lt;tr&gt;
        &lt;td align='left'&gt;D.O.B&lt;/td&gt;
        &lt;td  align='left'&gt;".$row['DOB']."&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td align='left'&gt;Mobile&lt;/td&gt;
        &lt;td align='left'&gt;".$row['MOBILE']."&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td align='left'&gt;Photo&lt;/td&gt;
        &lt;td &gt;&lt;img src='uploads/grumpy.jpg' height='200' width='200'&gt;&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;";
echo"&lt;/form&gt; ";
?&gt;                 
</code></pre>