There is an HTML file which takes first name and last name in it. Now I want that data to be into the file using python. There's something called CGI script, but I am not getting to how should I write. Moreover I am an newbie. So sorry for asking silly question
here's my HTML code:
<html>
<head>
<title>INFORMATION</title>
</head>
<body>
<form action = "/cgi-bin/test.py" method = "post">
FirstName:
<input type = "text" name = "firstname" /><br>
LastName:
<input type = "text" name = "lastname" /><br>
<input type = "submit" name = "submit "value = "SUBMIT">
<input type = "reset" name = "reset" value = "RESET">
</form>
</body>
</html>
My python code which i wrote is:
#!usr/bin/python
form = web.input()
print form.firstname
print form.lastname