$_GET variable variables, dynamic parsing (I'm not sure how to summarize this question) 
Author Message
 $_GET variable variables, dynamic parsing (I'm not sure how to summarize this question)

I have a script that successfully:

queries a table for possible attendees, and displays them sequencially
in a form, each with it own checkbox. In addition, the attendee might
have contributed money, so for each attendee, there is an INPUT box
beside their name.

This list is DYNAMIC; ie, if a record is added to the "attendee"
table, the form would display with the new attendee. If a record is
removed, they don't show up.

Other information is displayed as well, about the EVENT that is being
attended - ie, name of event, time of event, etc.

So when the user select "OK", and sends this information back, I'd
like to be able to:

a) parse the information about the event (THIS I can do NO PROBLEM)
b) determine WHO ATTENDED this event, and how much they contributed.

How can I do this? My problem is that parsing thru the $_GET array
seems clumsy. I can easily extract the information about the EVENT
itself, but when I start thinking about how to figure out WHO was
there, etc., I just don't know to do it elegantly.

It seems to me that there needs to be a way to run through the GET
array and determine which elements belong is a subset (ie, "this"
variable belongs to the AttendeeList, but "that" one does not)

Any suggestions??



Sun, 09 Oct 2005 23:37:08 GMT  
 $_GET variable variables, dynamic parsing (I'm not sure how to summarize this question)

Quote:

> I have a script that successfully:

> queries a table for possible attendees, and displays them sequencially
> in a form, each with it own checkbox.

Set the name of each checkbox to "attendees[]", and the value to the
identifier of the attendee.
Then, $_GET["attendees"] will be an array of attendee identifiers.

JB.



Sun, 09 Oct 2005 23:47:17 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. getting variable name from the variable itself?

2. Variable number of 'gets'

3. Geoip installed but not getting environment variables

4. Variable Not Passed With $_SERVER['PHP_SELF']

5. Variable link between C program and TK's variable

6. Class variables / global variables / Init variables

7. KeyEvent's CtrlKeyMask class variable is not initialized

8. Non-Procedure routine's variables not global ?

9. I'm not sure if this was posted before

10. I'm not sure why this is an error

11. Compile Question? (I'm not sure)

12. openMP: threadprivate not effected and function variables not passed

 

 
Powered by phpBB® Forum Software