You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
488 B

#!/usr/bin/python
2 years ago
# Import modules for CGI handling
import cgi, cgitb
2 years ago
# Create instance of FieldStorage
2 years ago
form = cgi.FieldStorage()
# Get data from fields
2 years ago
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>")