cgiex.nim 399 B

12345678910111213
  1. # Test/show CGI module
  2. import strtabs, cgi
  3. var myData = readData()
  4. validateData(myData, "name", "password")
  5. writeContentType()
  6. write(stdout, "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\">\n")
  7. write(stdout, "<html><head><title>Test</title></head><body>\n")
  8. writeLine(stdout, "name: " & myData["name"])
  9. writeLine(stdout, "password: " & myData["password"])
  10. writeLine(stdout, "</body></html>")