# simple.icn link cgi # This links the PRECOMPILED cgi library and makes # those functions available to you. procedure cgimain() # This is the start of the script host := getenv("REMOTE_ADDR") # This is an example of using the # Environment variables to get info. write("Submitted IP address: ", host,"
") write("Submitted on: ", &dateline) # Example reading form input specified in simple.html line 15. write("
Hello, ", cgi["name"], " welcome to the output page.
") write("Your age is: ", cgi["age"], "
") write("And I see you enjoy:") write(if cgi["pizza"] == "on" then "Pizza" else "", " ", if cgi["burger"] == "on" then "Hamburgers" else "", " ", if cgi["taco"] == "on" then "Tacos" else "", " ") write(" for every meal.
") write("And your favorite color to look at is") write(if cgi["red"] == "on" then "Red
" else "", " ", if cgi["green"] == "on" then "Green
" else "", " ", if cgi["blue"] == "on" then "Blue
" else "", " ") write("Education: ") write(if cgi["bs"] == "on" then "BS
" else "", " ", if cgi["ms"] == "on" then "MS
" else "", " ", if cgi["phd"] == "on" then "PHD
" else "", " ") write("

") write("Your words of wisdom are:

",cgi["comments"],"
") write("

If you changed your mind... ") write(" You can always Go Back!") write(" fix it and re submit it!


") end