While you're waiting for thinBASIC to support CGI, ScrptBasic is a easy way to write CGI scripts. You can use scriba (command line interpreter) or use the ScriptBasic HTTP multithreaded application server. (standalone or as a proxy to Apache) It could be a great way to learn CGI programming without all the work.
Here is an example of using scriba for a Hello World CGI program.
#! /usr/bin/scriba -c
INCLUDE cgi.bas
OPTION cgi$Method cgi::Get
cgi::Header(200, "text/html")
cgi::FinishHeader()
a = "Hello World !"
PRINT """
<html>
<header>
<title>ScriptBasic CGI</title>
</header>
<body>
<center>
"""
PRINT "<h1>" & a & "</h1>\n"
PRINT """
</center>
</body>
</html>
"""
END
Bookmarks