Simmo Posted January 6, 2011 Share Posted January 6, 2011 Hi I have a script that pulls all records out of the database, each record is within a form with no name which results with a lot of forms with essentially the same name. I have an hidden field with the accID which I use to delete the record. This does what I want it to do but have read that you should avoid having mutliple forms, I guess for validation. I know I could do this with a link and use GET, but would rather not having this action showing the details of the deletion in the URL. Is multiple forms so bad? Thanks Quote Link to comment Share on other sites More sharing options...
AbraCadaver Posted January 6, 2011 Share Posted January 6, 2011 You could use one form with a Submit/Delete button for each record. The value of this button would be accID. Quote Link to comment Share on other sites More sharing options...
Simmo Posted January 6, 2011 Author Share Posted January 6, 2011 Thanks for reply, I can get the value from that but I want the button to say "Delete", if I put the value there it would just show the number to be deleted which would look strange. Is that what you meant or have I missunderstood. Thanks Quote Link to comment Share on other sites More sharing options...
AbraCadaver Posted January 6, 2011 Share Posted January 6, 2011 Thanks for reply, I can get the value from that but I want the button to say "Delete", if I put the value there it would just show the number to be deleted which would look strange. Is that what you meant or have I missunderstood. Thanks Well, I hadn't really thought it through I guess. :-\ You can use an array for the delete buttons where the index is the accID: name="delete[1]" value="Delete" name="delete[5]" value="Delete" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.