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 Link to comment https://forums.phpfreaks.com/topic/223596-multiple-forms-is-this-really-a-problem/ 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. Link to comment https://forums.phpfreaks.com/topic/223596-multiple-forms-is-this-really-a-problem/#findComment-1155799 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 Link to comment https://forums.phpfreaks.com/topic/223596-multiple-forms-is-this-really-a-problem/#findComment-1155812 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" Link to comment https://forums.phpfreaks.com/topic/223596-multiple-forms-is-this-really-a-problem/#findComment-1155850 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.