We've made a form and when the user fills out the form and clicks "send" we want to do the following:
1) Get the data
2) Run a python script which displays the factorial of 10

<!test get form>
<html>
<head>
<center>
TEST
</center>
</head>
<body>
<form name="input" action="./fact.py" method="get">
Enter Text: <input type="text" name="txtfield"><br/>
<input type="radio" name="radio" value="true">
<input type="submit" value="send">
</form>
</body>
</html>

But when we click on send, instead of running the file, it downloads it. Any ideas why?

Recommended Answers

All 3 Replies

try putting this question on the programming thread. without seeing the python code, there's no way to tell what's wrong.

try putting this question on the programming thread. without seeing the python code, there's no way to tell what's wrong.

The python code works perfectly when we try to execute it in the terminal window.

yes, but it's not an HTML question.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.