[thelist] ColdFusion & URL Variables

Seth Bienek evolt.list at sethbienek.com
Wed Nov 20 09:16:00 CST 2002


Hi Chris,

CF will only see the last value in the URL with the same name.

If you want to pass multiple values, send them as a comma-delimited
list:

?task=remove_routes&formSubmit=1&remove_route=29918R001,29918R002,29911R
001,29922R001

Then loop through the variable itself as a list:
<cfloop list="#url.remove_route#" index="routenum">

I hope this is an option for you, otherwise you are going to have to
take a performance hit by deconstructing the url to get at your values
(via regex et al).

Hope this helps,

Seth

> -----Original Message-----
> Hello all, I am having a little problem figuring this out and
> I was hoping that someone could help.  I am trying to read in
> some variables from the url line. The problem is that a lot
> of the variables are using the same name.  This cannot be helped.
>
> The URL....
> ?task=remove_routes&formSubmit=1&remove_route=29918R001&remove
> _route=29918R002&r
> emove_route=29911R001&remove_route=29922R001
>
> I need to be able to loop through the remove_route and get
> the value for each. I have searched but I can't find anything
> usefull.  Can anyone help?




More information about the thelist mailing list