CM,

Well, when you get the result string after replacing the hyphens, what you have is a 
"&" delimited list.  Each item in that list is also a list, using "=" as the 
delimiter.  You can then loop over the outer list and create your own variables based 
on the inner list, which is the variable name and it's value.  Here's some code to 
show what I mean:

<cfset temp = CGI.QUERY_STRING>
<cfset temp =  Replace(temp, "-", "_", "All")>
<cfloop index="idx" list="#temp#" delimiter="&">
        <cfset x = SetVariable( ListFirst(idx, "="), URLDecode(ListLast(idx, "=")) )>
</cfloop>


So you end up with variables named card_state, card_zip, etc., which will carry the 
values passed via URL.  You may want to throw some error checking in there to prevent 
any possible problems with bad URLs (although list functions are pretty forgiving).

Lemme know if that works out for you.

Cheers,
-Max


At 9/10/2000 08:47 PM -0400, you wrote:
>Max,
>
>You are correct.  The problem is that you can not use "-" as a variable 
>name.  BTW, I'm getting these variables sent to me by a credit card company 
>and they don't want to change the values.
>
>This is what I have so far:
>
><cfset temp = CGI.QUERY_STRING>
><cfset temp =  Replace(temp, "card-", "card_", "All")>
>
><cfoutput>#temp#</cfoutput>
>
>I get this string: 
>mode=new&orderID=909987767&item1=2&user_id=116&card_address1=add1&card_address2=add2&card_city=city&card_state=state&card_zip=93950&country=usa&phone=831-643-2989&fax=831-643-2989
>
>Now, how do I extract card_address2=add2, card_city=city
>card_state=state and card_zip from this string?  If I can do that then all I 
>have to do is set the values with an underscore and pass that value.
>
>If someone can help me with this it would be a great help.
>
>Thanks,
>CM
>
>

------------------------------------------------------------------------------
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to