How to send the result of Python CGI script to the browser?


# Get data from fields from HTML page
first_name = form.getvalue('first_name')
last_name  = form.getvalue('last_name')
send data to Browser
print("Content-type:text/html")
print
print("")
print("")
print("Hello - Second CGI Program")
print("")
print("")
print("
Hello %s %s
" % (first_name, last_name))
print("")
print("")

Updated on: 22-Jun-2020

171 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements