HTML forms not working with python
<p>I've created a HTML page with forms, which takes a name and password and passes it to a Python Script which is supposed to print the persons name with a welcome message. However, after i POST the values, i'm just getting the Python code displayed in the browser and not the welcome message. I have stored the html file and python file in the cgi-bin folder under Apache 2.2. If i just run a simple hello world python script in the browser, the "Hello World" message is being displayed. I'm using WinXP, Python 2.5, Apache 2.2. the code that i'm trying to run is the following: </p>

<pre><code>#!c:\python25\python.exe
import cgi
import cgitb; cgitb.enable()
form = cgi.FieldStorage()
reshtml = """Content-Type: text/html\n
&lt;html&gt;
 &lt;head&gt;&lt;title&gt;Security Precaution&lt;/title&gt;&lt;/head&gt;
 &lt;body&gt;
 """

print reshtml 

User = form['UserName'].value
Pass = form['PassWord'].value

if User == 'Gold' and Pass == 'finger':
    print '&lt;big&gt;&lt;big&gt;Welcome'
    print 'mr. Goldfinger !&lt;/big&gt;&lt;/big&gt;&lt;br&gt;'
    print '&lt;br&gt;'
else:
    print 'Sorry, incorrect user name or password' 
    print '&lt;/body&gt;'
print '&lt;/html&gt;'
</code></pre>

<p>The answer to it might be very obvious, but its completely escaping me. I'm very new to Python so any help would be greatly appreciated.</p>

<p>Thanks.</p>
