PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hey Guys,
Im totally new to php, just started looking at it yesterday , but im trying to make a simple page, basically 4 drop down menus of which 3 is locked untill an option is choosen in one, each menu will be populated depending on the choice of the drop down menu preceding it.
eg menu 1 chooses "staff",
menu 2 is now populated with staff categories such as managers, employees.
so far ive managed to dynamically populate a drop down menu.
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
If php is needed to pull the results from a database, then you'll want to have that information readily available for the javascript. Or, you could do some AJAX.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
If you want to reload the page (because the form is being submitted) after each dropdown box is selected, then yes, you can do it in PHP.
ex: User selects 'staff' from first box. Form is submitted (page is reloaded), data is pulled for second dropdown box by PHP and then populated by PHP. User selects 'employees' from second dropdown box. Form is submitted (page is reloaded), data is pulled for employees... and on and on like that.
It will work, but javascript would be a better solution, as it would provide for a nicer user experience.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.