View Single Post
Join Date: Dec 2008
Posts: 12
Reputation: dourvas is an unknown quantity at this point 
Solved Threads: 0
dourvas dourvas is offline Offline
Newbie Poster

sql query into textarea

 
0
  #1
Dec 25th, 2008
hallo there.

i am new in programming so i ask for your understanding

i want to put the results from a sql query into a textarea. then i want to be able to pick one of the records of textarea and delete it (textarea and database). (i dont have to use textarea i just thouhgt it would be a good idea)

something is not right. this is my code

  1. echo "<form method=post name=f2 action='dd-delete.php'>";
  2.  
  3. $qry="SELECT id, member, math, bathmos FROM bathmoi";
  4. echo '<textarea name="show" rows="20" cols="70" readonly="readonly">';
  5.  
  6. while($result = mysql_fetch_array($qry)) {
  7. echo "$result[id], $resuld[memeber], $result[mathima]";
  8. }
  9. echo "</textarea>";
  10.  
  11. echo "<input type=submit value=Submit>";
  12. echo "</form>";

i receive:
  1. <br />
  2. <b>Warning</b>: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in <b>C:\xampp\htdocs\admin\drop_down\dd.php</b> on line <b>118</b><br />

can u help me? what should i do to see the records and be able to pick one of then in order to delete it (from database and textarea)?
Last edited by peter_budo; Dec 29th, 2008 at 5:50 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote