title: Python CGI Script Not Executing
body: <p>Just doing a basic python project with HTML file, i came across a tutorial which gave an idea about how i can execute the code, </p>
  
  <p>here is the HTML code</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;meta content="text/html; charset=ISO-8859-1"
   http-equiv="content-type"&gt;
    &lt;title&gt;Admin Login&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;big&gt;&lt;big&gt;Login
  Here&lt;br&gt;
  &lt;br&gt;
  &lt;/big&gt;&lt;/big&gt;
  &lt;form action="/var/www/cgi-bin/Login.py" name="LoginForm"&gt;&lt;big&gt;Administration
  Login&lt;br&gt;
   User Name&lt;br&gt;
    &lt;input name="UserName"&gt;&lt;br&gt;
    &lt;br&gt;
    &lt;br&gt;
  Password&lt;br&gt;
    &lt;input name="PassWord"&gt;&lt;br&gt;
    &lt;/big&gt;&lt;br&gt;
     &lt;br&gt;
    &lt;br&gt;
  &lt;input type="submit"&gt;
    &lt;br&gt;
  &lt;/form&gt;
  &amp;nbsp;__&amp;nbsp;&lt;br&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and the python code..</p>
  
  <pre><code>#!/usr/bin/python
  import cgi
  import cgitb; cgitb.enable()
  # get the info from the html form
  form = cgi.FieldStorage()
  #set up the html stuff
  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 == 'Myusername' and Pass == 'MyPasword':
      print '&lt;big&gt;&lt;big&gt;Welcome'
      print 'Hello&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 problem is, when i submit the username and password, it just shows the whole code back on the browser and not the required Welcome message :(. I use Fedora13 .. can anyone tell me what is going wrong? I even changed the permissions of the file(s). </p>