jQuery Listbox Database Update Script

jQuery Listbox Database Update
This solution helps you to use listboxes in multiple records and to update the database using Ajax when the selection of a listbox changes. Thereafter it will show a temporary message under the listbox.
Author: SimplytheBest.net Price: Free GPLv2 Type: Javascript, jQuery,PHP

EXAMPLE

This demo will post to the update PHP script and return the response. The table is to show you what it looks like and how it works.

CONTACTS

Add Contact
Region Startdate Contact Status
08-20-2013 John Johnson

STEP 1

Insert the jQuery function before and outside of the record retrieval loop. You must of course have jQuery loaded. We have included the .change function for two listboxes in this example.

Click in textarea to select code then copy and paste Ctrl-CCtrl-V

STEP 2

Construct your record retrieval code something like this.

Click in textarea to select code then copy and paste Ctrl-CCtrl-V

STEP 3

Write the updatedatabase.php something like this for each listbox you have. The returncode includes the message that gets sent back to the page.

Click in textarea to select code then copy and paste Ctrl-CCtrl-V