Jump to content

Using PHP to control a form with repeatable selects.


scotchegg78

Recommended Posts

HI guys.

 

I have 3 tables,

region(regionID,name)

event(eventID,desc)

rating(ratingID,desc)

 

and one data table...

 

(regionID,eventID,ratingID)

 

It is simply used to assign ratings of events to regions, there are other fields but not relevent here.

 

Whats the best way to create the input to db data table?

 

I am allowing one region to be added a time, so I assume the form needs to loop though all events and then also pull from the ratings table for the select options. Is it a good idea to name the rating select boxes the eventID ? so in my mysql statement i know what the region is from the form(also drop down), but more importantly I will then have a select box with an event ID and value. Is this the best way to do it?  Only issue is the mysql code then needs to know how many events there are and their ids to also then search for the form posts names of all the rating selects ?

 

with me?!

 

cheers for any guidance

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.