Created
May 29, 2013 17:14
-
-
Save fapestniegd/5672009 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
#!/usr/bin/python | |
# Import modules for CGI handling | |
import cgi, cgitb | |
# Create instance of FieldStorage | |
form = cgi.FieldStorage() | |
# Get data from fields | |
first_name = form.getvalue('first_name') | |
last_name = form.getvalue('last_name') | |
print "Content-type:text/html\r\n\r\n" | |
print "<html>" | |
print "<head>" | |
print "<title>Hello - Second CGI Program</title>" | |
print "</head>" | |
print "<body>" | |
print "<h2>Hello %s %s</h2>" % (first_name, last_name) | |
print "</body>" | |
print "</html>" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment