CGI Question
Gregory Lypny
gregory.lypny at videotron.ca
Wed Aug 31 15:03:03 EDT 2005
Hello everyone,
I'm using a stack as a CGI script but I'm having a problem accessing
a field. The stack is called from a text file with the following
script:
#!../revolution
on startup
start using stack "thisStack.rev"
signup
end startup
The stack "thisStack" has the following stack handler. I'm simply
trying to gather data from a form, redisplay it on a web page, and
save it in a field in the stack. The problem is that writing to a
field gives me an error. If I comment-out the sixth line from the
end, that is,
put webOutput into fld "Another List"
it works fine; but when I reinstate it, I get a server error. What
am I doing wrong? Also, can anyone tell me where I can get the most
recent CGI engine for Mac OS X?
Regards,
Greg
on signup
put $SCRIPT_NAME into cgiName
put $QUERY_STRING into theData
put urlDecode(theData) into theData
split theData by "&" and "="
put keys(theData) into formVariables
repeat for each line x in formVariables
if theData[x] is empty then put "blank" into theData[x]
end repeat
combine theData using cr and tab
put "<p>" & cr & theData into webOutput
--put webOutput into fld "Another List"
put "<p>" & cgiName & "</p>" & the long date && the time & cr
before webOutput
put "Content-Type: text/html" & cr
put "Content-Length:" && length(webOutput) & cr & cr
put webOutput
end signup
More information about the use-livecode
mailing list