skylab001 Posted March 18, 2008 Share Posted March 18, 2008 Hello- I am a beginner here and probably trying something beyond what I can possibly do but, I am trying to figure out how to set-up a page that would allow me to have a drop down menu that selects between two options, and then have one of two forms(based on the option selected in the dropdown) display on the page. How complicated would this be? I was thinking of incorporating a javascript onChange with a php require, but when I started to work it out I confused myself more because I don't know javascript. So I'm back to hoping I can do this with php? Link to comment https://forums.phpfreaks.com/topic/96757-using-php-to-switch-between-forms/ Share on other sites More sharing options...
chronister Posted March 18, 2008 Share Posted March 18, 2008 You most certainly can do this with PHP only. The only thing is it will require a page refresh. You will simply make your drop down menu with the options you want. Then use an if statement once the submit button is hit to determine which form to use. If you want it to happen without a page refresh, then AJAX or plain javascript will be necessary. Nate Link to comment https://forums.phpfreaks.com/topic/96757-using-php-to-switch-between-forms/#findComment-495157 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.