cgi does not do "save stack"

Björnke von Gierke bvg at mac.com
Wed Sep 10 10:28:01 EDT 2003


I am able to do all kind of nifty things in my cgi tests, but I am 
unable to save a stack, no matter how I try it. Is there a bug, or must 
I just save differently then in the normal environment? Maybe it's 
because I use the metacard engine?

cgi script below:
#!mc
on startup
   open stack "guestbook"
   read from stdin until empty
   if it <> empty then
     put urldecode(it) into data
     split data by "&" and "="
     go to last card
     create card
     put the short internet date into field "date"
     put data["name"] into field "name"
     put data["text"] into field "entry"
     replace return with "<br>" in field "entry"
   end if
   put  "Content-Type: text/html" & crlf & crlf
   put "<html><head><title>You are on my iBook! @ 
bvg.kicks-ass.org</title></head><body bgcolor=" & quote & "148D00" & 
quote & ">"
   repeat with x = the number of cards down to 1
     go to card x
     put "<p>date:<br>"  & field "date"
     put "<br>name:<br>"  & field "name"
     put "<br>text:<br>" & field "entry" & "</p><hr>"
   end repeat
   put "</body>"
   save stack "guestbook" --does not work!!
   close stack "guestbook"
end startup




More information about the use-livecode mailing list