I display rows of mySQL records with two buttons - Edit and Delete, at the end of each row. A user is supposed to click either edit or delete of a chosen row and be presented with the contents of the chosen record on a form. She/he can then edit the contents of the form and submit or delete as the case may be.
I use ajax/jquery to retrieve the value of the clicked button and php to process the input. I am having hard time displaying the records appropriately and retrieving the value of the selected button using ajax/jquery. Once retrieved I would use php to process it and display a confirmation message in a div.
1. Is it better to have a separate form for each pair of edit/delete buttons? Would that mean a unique id for every form to distinguish it from the rest? That is, if on form submit is to be used in ajax/jquery. OR
2. Use the same form for all the buttons and get the value of the clicked button (either edit or delete) and the record id associated with it?
3. How would the html/php code to list the mySQL records and the ajax/jquery code retrieve the values look like?
Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline
A frequently used term in Object-Oriented design is "SOLID" which is a mnemonic acronym that covers five principles of OO design. These principles do not stand alone; there is interplay among them. And they are not laws, merely princ…
A publishing tool, a Version Control System, or a Collaboration Platform! These can be some of the defining words for the two very famous web-hosting Git repositories: Bitbucket and Github. Git is widely used amongst the programmers and developers f…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5.
As we learned in our last micr…