Enumerate POST/GET variables?

Posted by stevenseagal008 on 11-Feb-2011 15:10

I currently have a form that submits to a Webspeed page.  Now, if I know the variable names ahead of time, it is very easy to get their value using the GET-VALUE function.

However, I currently am writing a Webspeed program that could accept many different forms.  I would prefer being able to dynamically see which variables are incoming rather than doing

IF cIncomingPage EQ "foo" THEN

  GET-VALUE("foo").

ELSE IF cIncomingPage EQ "bar" THEN
  GET-VALUE("bar").

...etc.

Is there a way to list all available GET/POST variables, and parse them in an array-like fashion?  I know this can be done in a language like PHP, using array_keys($_POST).

All Replies

Posted by Matt Baker on 11-Feb-2011 15:26

Yes.  Pass ? (unknown) to any of the get-fields/get-values/get-cookies and it returns a comma delimited list of those values that have been defined in the request

Posted by stevenseagal008 on 11-Feb-2011 15:34

Great!  It was even in my documentation, I just didn't see it as I was looking for a separate function.  Much thanks

This thread is closed