View Single Post
Join Date: Dec 2008
Posts: 20
Reputation: manish.s is an unknown quantity at this point 
Solved Threads: 1
manish.s manish.s is offline Offline
Newbie Poster

Re: sql query into textarea

 
0
  #2
Dec 25th, 2008
$qry="SELECT id, member, math, bathmos FROM bathmoi";
$handle=mysql_query($qry);

echo '<textarea name="show" rows="20" cols="70" readonly="readonly">';


if(mysql_num_rows($handle) > 0)
{

  while($result = mysql_fetch_array($handle)) 
  {
    echo "$result[id], $resuld[memeber], $result[mathima]";
  }

}
echo "</textarea>";

also it is not a good practice to allow user to delete records through a text box, the possibilities of error will increase.
you can list result in tabular form and display a delete link in the last column of each record rows.
Last edited by manish.s; Dec 25th, 2008 at 2:34 pm.
-- Manish Singh
manish.s@neuralit.com
Reply With Quote