On Wed, 20 Oct 2004 13:27:10 -0500, Ben Densmore  wrote:
> I'm trying to find the best way to take a query string that would look
> something like name=somename&id=12&address=123&email=yes   and pull
> out the values. These query strings are stored in a field in a
> database. I just can't seem to think of a way to do this.

You can treat the string as a list with "&" as the delimiter. Each
element in that list can then also be treated as a list with "=" as
the delimiter.

Knowing that, there are several avenues you can take. You can create
an array out of the main list (as Oasim suggested), which will give
you an array of just the name/value pairs. You can then extract each
value treating each element in that array as a list with 2 items
(delimited by "=").

Or, you can loop over the main list (string), and similarly extract
the names and values.

Scott
-- 
-----------------------------------------
Scott Brady
http://www.scottbrady.net/

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.houseoffusion.com/banners/view.cfm?bannerid=11

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:182064
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to