Created
January 19, 2016 20:01
-
-
Save iArnold/7c55596b1201c2d90e0f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [ | |
title: "Red CGI test input from POST and/or GET using input from ansi.red" | |
] | |
#include %../../../fossil/C-library/ansi.red | |
standard-input: input | |
env-vars: get-env "REQUEST_METHOD" | |
print "Content-Type: text/html^/" ;-- Required Page Header | |
html: "<html><body>" | |
code: "<h2>Test Red CGI input!!</h2>" | |
html: append html code | |
code: env-vars | |
html: append html code | |
code: " <br />" | |
html: append html code | |
code: standard-input | |
html: append html code | |
code: { | |
<form name="Redform" action="redcgipost.cgi" method="post" target="_self"> | |
<fieldset> | |
<legend> "Add a short text:" </legend> | |
<p> | |
<label for="title-text"> "Text" </label> | |
<input type="Text" id="formtitle" name="title-text" maxlength="200" size="40" /> | |
</p> | |
<p> | |
<input class="forminputbutton" type="Submit" name="submit" value="Add the text" /> | |
</p> | |
</fieldset> | |
</form> | |
} | |
html: append html code | |
code: "</body></html>" | |
html: append html code | |
print html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment