- From: Tei <oscar.vives@gmail.com>
- Date: Tue, 19 May 2009 15:16:10 +0200
- To: www-html@w3.org
- Message-ID: <a093da440905190616g625131cbweade2ec1e0e5f800@mail.gmail.com>
On Tue, May 19, 2009 at 6:53 AM, Octavio Alvarez <alvarezp@alvarezp.ods.org>wrote: > On Mon, 18 May 2009 04:42:56 -0700, Philip TAYLOR (Ret'd) < > P.Taylor@rhul.ac.uk> wrote: > > > David Dorward wrote: > > > >> One form around the entire table, with the name of the successful submit > >> button being used to determine which row is being acted upon. (We should > >> be able to use value, but IE7 and lower have broken implementations of > >> <button>). > > > > But the original question was how to have multiple forms > > within a single table (one per row), not how to be able > > to differentiate from within which row a particular > > "Submit" operation took place. > > Why would you need to have multiple forms (read: multiple forms with > different actions each), one per row, given that properly tabulated > data should be similar in type? so you suggest to use a single form, and differentiate the data, based on the submit? <form action="emailgestor.php"> <table> <tr> <td><input type="checkbox" name="email_1"> favorite</td><td>Re: forms</td><td><input type="submit" name="reply_1" value="Reply"><input type="submit" name="delete_1" name="Delete"></td> </tr> . . . . <tr> <td><input type="checkbox" name="email_30"> favorite</td><td>Re: looks mom, no hands</td><td><input type="submit" name="reply_30" value="Reply"></td><td><input type="submit" name="delete_30" name="Delete"></td> </tr> </table> </form> On the server: for($t=1;$t<=$maxemails;$t++){ if (isset ( $_POST["reply_" . $t] ) ) { replyEmail($t); } else if (isset( $_POST["delete_". $t] ) ) { deleteEmail($t); } if (isset( $_POST["delete_". $t] ) && $_POST["delete_". $t] == "on" ) { favoriteEmail($t, true); } else { favoriteEmail($t,false); } } humm... maybe this work. -- -- ℱin del ℳensaje.
Received on Tuesday, 19 May 2009 13:17:10 UTC