HTML POST does not execute the script, but downloads it
by Jeays from LinuxQuestions.org on (#52T07)
I have this very simple form. When the submit button is pressed, it attempts to download a copy of the script instead of executing it. The script is an executable, tested Python program. The same thing happens if I replace the Python script with a bash script.
<h3>Comments?</h3>
<pre>
<form method=POST action=/cgi-bin/comments.py>
Email: <input type="text" name="email">
Subject: <input type="text" name="subject">
Comment: <input type="textarea" name="comment">
<input type="submit" value="Submit">
</pre>
</form>


<h3>Comments?</h3>
<pre>
<form method=POST action=/cgi-bin/comments.py>
Email: <input type="text" name="email">
Subject: <input type="text" name="subject">
Comment: <input type="textarea" name="comment">
<input type="submit" value="Submit">
</pre>
</form>