Answer the question
In order to leave comments, you need to log in
How to make a user system?
There is just a form:
<form action="blabla.html">
<div class="container">
<label for="username"><b>Username</b></label>
<input type="text" placeholder="Enter Username" name="username" required>
<label for="psw"><b>Password</b></label>
<input type="password" placeholder="Enter Password" name="psw" required>
</div>
</form>
$username = "Admin";
$psw = 1234567890;
if username=Admin; psw = 1234567890
require('loggedhome.html')
else
echo 'Неверный пароль'
Answer the question
In order to leave comments, you need to log in
The simplest authorization option does not require a database at all. For example, for each e-mail, you can calculate some unique checksum and issue it during registration, like a password. Further, during authorization, simply check that the e-mail matches the entered password (checksum) and, depending on this, either authorize or give an error. Of course, only you should know the algorithm for calculating the sum.
As for storing passwords in a text file, the idea is frankly bad, since under certain circumstances you can simply lose them due to cross-writing or server failure. Better to do without a text base at all.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question