help with form

I’m quite new to php and could use some help trying to figure out how to work a form. I’m setting up a website for a wedding, and as part of the guest registration, they would like for people to be able to go to their website and enter their name and their choice for dinner. If one person is registering for multiple guests however, i don’t want them to have to keep filling out the same form over and over.

What I would like for the form to do is start with a drop down menu where they can select the number of guests…and then AFTER that number is selected it will open the correct number of slots to put names and the menu for dinner choices. However, obviously, I have no idea how to make it do this.

Can anyone either suggest some coding to try, or have some that works?

Lots of ways to do it (from what you have described so far).

You could use JAVASCRIPT to make the adjustment of the number of fields based on the number of guests. It would be “Fancier” and not require you to “Submit” data but it may also be a lot more work.

I would consider a form that starts out as a simple html “Submit” for the number of guests. On the receiving page you can use PHP to take that value and present the appropriate amount of fields

Sponsor our Newsletter | Privacy Policy | Terms of Service