Go4Expert

Go4Expert (http://www.go4expert.com/)
-   PHP (http://www.go4expert.com/forums/php/)
-   -   PHP - add to list functionality? (http://www.go4expert.com/forums/php-add-list-functionality-t5898/)

deBassMan 17Aug2007 01:31

PHP - add to list functionality?
 
Hi all

I'm new to this forum (and PHP) but quite experienced with VB, VBA etc.

In MS Access I regularly coded an Auto Add to List combo box - i.e a combo box (like a html select box with more functionality) which automatically added a row in the underlying db if the user entered an option that wasn't there.

E.g Imagine a select box with options: red, green, blue.

If the user types: red, then the code (after confirmation) would add it to the db and red would immediately become another valid option in the select box.

This functionality proved v.popular with users.

I'd like to simulate this functionality in php and mysql - does anyone have any ideas how this could be achieved?

thanks in advance

pradeep 17Aug2007 10:38

Re: PHP - add to list functionality?
 
You'll need to use JavaScript! Ajax to update the DB and some more JS to update the select box with the new option!


All times are GMT +5.5. The time now is 05:41.