this code is echoeing table the times i enter the reccord for a particular registration number.plx help me out!!!!
if(isset($_REQUEST["Submit"]))
{
$Registration_num=$_REQUEST['reg_num'];
$query1=mysql_query("SELECT * from medicines where Registration_num = '$Registration_num'") ;
while($row=mysql_fetch_array($query1))
{
$query="select * from medicines where Registration_num='$Registration_num'";
$result=mysql_query($query);
mysql_query($query);
echo "<table border=1>";
echo "<br><tr><td><b> <font color='#CC66FF'>Id</td><td><b>Prescribed_med</td><td><b>allergic_med</td><td><b>Dosage_unit</td>";
while($row=mysql_fetch_array($result))
{
$pr_med= $row[1];
$al_med=$row[2];
$d_unit=$row[3];
$Id=$row[0];
echo "<tr><td><input name='checkbox' type='radio' value=$Id></td><td>". $pr_med."</td><td>". $al_med."</td><td>".$d_unit."</td></tr>";
}
echo "</table>";
}