Click to See Complete Forum and Search --> : Simple (I think) for m help


bzptlx
08-13-2008, 02:45 PM
I have a form pulldown and I want to change my page dynamically by what is selected. If the user selects Option One, Data is pulled from a MYSQL DB and displayed for edit. If the user selects Option Two, the same fields are set for new input. I'm lost.....

sstalder
08-13-2008, 06:11 PM
Google is an amazing tool :)

http://www.google.com/search?hl=en&q=php+dynamic+select+option

bzptlx
08-14-2008, 09:36 AM
Let me clarify. When the user selects an option from the dropdown (Store Name), several fields (address, city, state, zip etc) are populated from the mysql db for edit/update. If the store name is not existing, the user selects "New Store" and the name, address, city etc fields are present for input. I have absolutel no problems populating the pulldown, what I want to do is when the user makes the selection within the pulldown, change the form based on the selection.

sstalder
08-14-2008, 10:18 AM
Are you able to share your form / php code at all? Or atleast some example code so we can see the structure?

How is it currently working? Can the user only select the option one time to populate the fields, and you want them to be able to change their selection after that once again?

bzptlx
08-14-2008, 10:54 AM
That's the rub. I don't know how to proceed. I can populate a static form without any problems but I want to make the form structure and data to changed dynamically based on wht the user selects. I think the PHP code would be a simple if/then structure but I am having an issue on how to interface with the user. Maybe this should be either AJAX or Javascript. I don't know.

bzptlx
08-14-2008, 04:13 PM
Flag this resolved. I ended up using AJAX to make this work. Thanks.