Can anyone point out where I am going wrong here. I have two scripts, one for the form and the other for the processing. It looks correct but after two hours of staring at it I cannot see where I am going wrong.
Here are the two scripts, they are very short so please take a look at it.
<title>Marks Sonitus Practice</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Practice">
<meta name="author" content="CGI Practice">
<form action="process_data.py" method="post">
<html><span> First </span></label>
<input type="text" name="firstname"/>
<input type="submit" name ="submitname" value="Submit Name"></form>
file_name = "/var/www/cgi-bin/practice/process_practice.py"
f = os.path.abspath(os.path.join(file_name))
print"This file could not be found!"
form = cgi.FieldStorage(f)
firstname = form.getvalue('firstname')
Well thats simple in your form replace the
action=http://localhost/cgi-bin/practice/process_practice.py or may be
action=http://localhost/cgi-bin/practice/process_data.py whatever the name of that script is.