943,174 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 30
  • PHP RSS
Aug 31st, 2010
0

How can I accomplish this with forms?

Expand Post »
I have a table with content fetched from a html table. I have a modify and delete column.

In the modify column I have submit forms which send as hidden input the id of the column.

In the delete column I want to have checkboxes that will be linked to another submit button, outside the table.

I do not know how to do this, particularly to separate forums on rows for the modify column, and make all the rows in the delete column part of the same form.

This is the current form of the table:

PHP Syntax (Toggle Plain Text)
  1. $resource=$registre->query($query);
  2. header();
  3. while($row=$resource->fetch_row()){
  4. $data1=explode('-',$row[1]);
  5. $data2=explode('-',$row[5]);
  6. $data3=explode('-',$row[7]);
  7. echo "<tr>
  8. <td>$row[0]</td>
  9. <td>$data1[2]</td>
  10. <td>$data1[1]</td>
  11. <td>$data1[0]</td>
  12. <td>$row[2]</td>
  13. <td>$row[3]</td>
  14. <td>$row[4]</td>
  15. <td>$data2[2]</td>
  16. <td>$data2[1]</td>
  17. <td>$data2[0]</td>
  18. <td>$row[6]</td>
  19. <td>$data3[2]</td>
  20. <td>$data3[1]</td>
  21. <td>$data3[0]</td>
  22. <td><form action='furnizori.php' method='post'>
  23. <input type='hidden' name='inserted' value='1'>
  24. //row[8] is the id of the row
  25. <input type='hidden' name='modify_id' value='$row[8]'><input type='submit' value='Modificy'></form></td>
  26. <td><form action='furnizori.php' method='post'>
  27. <input type='hidden' name='inserted' value='1'>
  28. <input type='hidden' name='delete_id' value=''>
  29. <input type='checkbox' value='$row[8]'></form></td>
  30. </tr>";
  31. }
  32. echo "</table>";
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
arthurav is offline Offline
38 posts
since Jun 2010
Sep 2nd, 2010
0
Re: How can I accomplish this with forms?
anybody?
Last edited by arthurav; Sep 2nd, 2010 at 10:24 am.
Reputation Points: 10
Solved Threads: 0
Light Poster
arthurav is offline Offline
38 posts
since Jun 2010
Sep 7th, 2010
0
Re: How can I accomplish this with forms?
bump
Reputation Points: 10
Solved Threads: 0
Light Poster
arthurav is offline Offline
38 posts
since Jun 2010

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Count Same Records in MS access using odbc and php
Next Thread in PHP Forum Timeline: How to retrieve name list from mysql and add a text box





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC