Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Problem with CGI

From: ZikZak:wanadoo at: 25-Jan-2004 12:36

Le Sun, 25 Jan 2004 11:48:20 +0100 Petr Krenzelok <[petr--krenzelok--trz--cz]> a =E9crit : ||system/options/cgi is object, which is being given data only if rebol |is |run in cgi mode, so - do you run your rebol session using -c |option?| ||#!/path/to/rebol/rebol -c || ||REBOL [] || ||your script here ... don't forget to print following two lines first: || ||print "Content-Type: text/html" ||print newline || ||btw: what OS and what web server do you use? || || ||-pekr- Ok, Here are the informations you need : OS : GNU/Linux Server : THY 0.7.1 Rebol : Core My CGI (send.cgi) : #!rebol -cs rebol [title: "EMail"] print "content-type: text/html^/" data: system/options/cgi/query-string cgi: make object! decode-cgi data print [<HTML><BODY><h1>Email Status<h1><hr><P>] failed: error? try [send to-email cgi/email cgi/message] print either failed [ {the email could not be sent.} ][ [{the email to} cgi/email {was sent.}] ] print {</BODY></HTML>} ========================== ====== My html form (email.html) : <html> <body> <form action="" method="get"> <h1>CGI EMAILER</h1><hr> Enter your email address:<P> <input type="text" name="email" size="30"><P> <textarea name="message" rows="7" cols ="35"> Enter your message. </textarea><P> <input type="submit" value="Submit"> </form> ========================== ======== Do you need more informations ? Regards -- ZikZak