I am working on a web GUI for a program I wrote the first thing a user of this software will access is the default login page for the program with that, said how do you take the username and password that the user-provided and validate it
how do you take the input from the user?
this is the login page in the flask script
@app.route('/login', methods=['GET', 'POST'])
def login():
if request.method == 'POST':
if request.form['log'] == "Log In Here":
u_name = request.form['Uname']
pass_wrd = request.form['Pass']
else:
pass
print ( u_name , pass_wrd)
return
else:
return render_template('login-form.html')
this is the HTML side for the login page
<form id="login" method="get" action="login.php">
<label><b>User Name
</b>
</label>
<input type="text" name="Uname" id="Uname" placeholder="Username">
<br><br>
<label><b>Password
</b>
</label>
<input type="Password" name="Pass" id="Pass" placeholder="Password">
<br><br>
<input type="button" name="log" id="log" value="Log In Here">
<br><br>
<input type="checkbox" id="check">