Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cycling through variables

Status
Not open for further replies.

boab

Programmer
Joined
May 30, 2001
Messages
75
Location
GB
Guys any help appreciated with this.

The problem:

I have a system which dynamically generates a form for a user to fill out consisting of a number of criteria each of which is scored in six different areas D, LT, FP, LO, I, RT, using SELECT element. As the form is dynamically generated I have named each of SELECT elements in the format in the same format as the criteria Id in the database i.e.D4.1.1

D4 = overall unit
D4.1 = Element within D4
D4.1.1 = Criteria within Element D4.1

in the form there is also a final part

D4.1.1.D = Scoring Area 'D' within D4.1.1

All of the SELECT elements are checked for a value using javascript and then passed to a php function for insertion into the database. My problem is that I need to know how to cycle through the variables from the form on the criteria number in the php which the form sends to (forms are submitted at the end of every element). What I imagine is that I can change the name of the variable at the criteria number as this is only part of the variable name which is not certain (all the othere parts are pre defined). But how do I change the name

Anyone got any Ideas?

%-)


THe Start of wisdom is to realise you know nothing. I must be a genius then!
 
you can use a foreach loop to move thru the key, value pairs coming fom the form

Bastien

Any one have a techie job in Toronto, I need to work...being laid off sucks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top