Rishi Patel
@Egyptian-Fantasy
I love coding. I am good at it too!
0
Calculaty 5.0Say hi to Monty!
1
3
0
0
This is my latest game called zombie apocalypse where you are in a world and zombies are killing everyone! Can you save the rest of the population? Pl
Python
How do I create a WORKING log in form, which remembers you and you are able to create an account? I have also struggled with this a lot in the past.
BangLuon from flask import Flask,request
from replit import db
app = Flask(name)
@app.route('/login',methods=["GET","POST"])
def login():
if request.method == "POST":
db[request.form["username"]] = request.form["password"]
return5 months ago
CosmicBear You need a backend server (try flask or node.js) with a database. For example:
#python
from flask import Flask,request
from replit import db
app = Flask(name)
@app.route('/login',methods=["GET","POST"])
def login():
if request.method == "POST":
db[request.form["username"]] = request.form["password"]
return
`2 years ago
ch1ck3n you can't just do it with HTML
i am not going to give you code because you will learn to do it yourself
eh the hell with it
first the HTML
POST is a more secure way than GET
next I assume you are using express with nodejs
you will make a post route app.post() and in that function you will get the form values and set it to the database2 years ago
Did you ever think you could play would you rather with a computer? Well now you can! You will be asked a series of questions and you are to type your
Python
lsikora Cool! I would add a few thing here. The first being so it gives you a actual score. Not just 10-22. Another thing is changing the formating of the inputs. Here is a example
import time #puts time in there
print("Would you rather fall in lava or drown in water?") #asks the question
time.sleep(1) #waits 1 second so you can think
fa = input() #lets the quiz taker input there response
print(fa) #prints out the response
This is just a example and you can go in debt with if, else statements after, bu2 years ago