>                                                  
>;;;query-string is redefined to simulate input from a form
>query-string: "name=tim&[EMAIL PROTECTED]&phone=9005551212"       
>cgi: make object! decode-cgi system/options/cgi/query-string

cgi: make object! decode-cgi query-string

will work in your example, as will

system/options/cgi/query-string:
"name=tim&[EMAIL PROTECTED]&phone=9005551212"       
cgi: make object! decode-cgi system/options/cgi/query-string


Explanation:

You are creating a global word query-string here =>
>query-string: "name=tim&[EMAIL PROTECTED]&phone=9005551212"       

however you are passing decode-cgi a different query-string word embedded
in an object here:
>cgi: make object! decode-cgi system/options/cgi/query-string

this .../cgi/query-string is a different query-string from your query-string.

This has to do with contexts. The object cgi, in the path system/options
has its own context and system/options/cgi/query-string is limited to the
cgi object's context (unless its context is extended by referencing it from
outside the cgi object. Don't worry about that just now.) When you create
query-string as a glocal word - which is what happens by default when you
do what you did - it does not affect the query-string in the context of cgi
object.

use probe system/options/cgi

to see the contents of the cgi object.

use =>
system/options/cgi/query-string:
"name=tim&[EMAIL PROTECTED]&phone=9005551212"       

to more realistically simulate the situation you will encounter when you
run the script as a cgi script.

Hope this helps

;- Elan >> [: - )]

Reply via email to