Skip to content
Snippets Groups Projects
Commit 9ad08c3f authored by Poudel, Pramod's avatar Poudel, Pramod
Browse files

Upload New File

parent 75523c06
No related branches found
No related tags found
No related merge requests found
app.py 0 → 100644
from flask import Flask, render_template, request
app = Flask(__name__)
@app.route("/")
def index():
return render_template("index.html")
@app.route("/save", methods=["POST"])
def save_data():
input1 = request.form.get("input1")
input2 = request.form.get("input2")
input3 = request.form.get("input3")
# Save the data to a file or database
with open("data.txt", "a") as f:
f.write(f"{input1}, {input2}, {input3}\n")
return "Data saved successfully."
if __name__ == "__main__":
app.run(debug=True)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment