I am interested in having a small Wordpress Plugin created which will allow me to display a form on a page, which interacts with a MySQL database. Here are the project requirements:
1. Form 1 displays the following fields:
- Load Record (dropdown - containing list of existing records in db)
- Load Button
- Create New Button
2. Form 2 displays the following fields:
- ID (readonly textbox - 10 characters)
- Full Name (editable textbox - 30 characters)
- Employed (radio button - displays a yes/no radio button choice)
- Favorite Color (dropdown - displays the choices: Red, Green, Blue)
- Save Changes Button
3. User can select an existing database record from Form 1, click Load button, and Form 2 is populated with the data from the selected record.
4. User can click the Create New button on Form 1, and Form 2 is blanked out, ready to receive input for a new record
5. User can enter/edit data in Form 2, click the Save Change button, and:
5a: If new record, then performs an insert into the MySQL database
5b: If existing record, then performs an update in the MySQL database
6. Error message is displayed if database cannot be accessed
7. Confirmation message is displayed whenever a record is loaded, updated, or inserted.
8. MySQL Database contains the following structure (can be changed if necessary to support the other project requirements):
CREATE TABLE IF NOT EXISTS `information` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`fullname` varchar(30) NOT NULL,
`employed` char(1) DEFAULT NULL,
`favorite_color` varchar(20) DEFAULT NULL,
PRIMARY KEY (`id`)
9. Form 1 and 2 can be a single Form is easier or more efficient.
10. Form(s) are displayed on Wordpress Page using shortcode
12. Form(s) update as appropriate to display loaded records and confirmation messages, using AJAX / JQuery
Thanks for your interest!