0

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>";

}

Edited by Member 784017: n/a

2
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by rajarajan07
0

this code is echoeing table the times i enter the reccord for a particular registration number.plx help me out!!!!
i want the table to show all the values just once for the particular record

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.