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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.