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.
21 lines
488 B
21 lines
488 B
#!/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>")
|
|
|