I am trying to use Python and HTML together. What I'm trying to do is create an HTML form that will pass data to a python file and that python file will process the data. But I am not going to work.
Here is my Python code:
form = cgi.FieldStorage() # instantiate only once!
name = form['Sample Name'].value
and this is my html code:
<form method='POST' action='/functionGen.py'>
Name: <input type='text' name='Sample Name'>
<input type='submit' value='Begin Storing'>
</form>
What ultimately happens is just to see my python code in a browser, the file does not start processing data.
What can I do?
source
share