Skip to content Skip to sidebar Skip to footer

Get Form Data Using Python

How do i get form data in my Python code. Below is my current code. import cgitb; cgitb.enable() import cgi import sys form = cgi.FieldStorage() name = form.getValue('name') print

Solution 1:

You were close:

form = cgi.FieldStorage()
name = form['name'].value
print 'Hello ' + name

Post a Comment for "Get Form Data Using Python"