Hello.
That's the function I use to store the password in my Database + I did Salted it. You can see the function. Registration works perfectly.
reg.php
Now comes the part that I don't really understand... login.php
I want to log in , and if password and username are correct I will be redirected to xyz.php , that has if isset function , that checks the user if he is really logged in.
Any idea how I could make simple login page? I would appreciate small snippet etc...
I use mysqli
Thanks !
That's the function I use to store the password in my Database + I did Salted it. You can see the function. Registration works perfectly.
reg.php
PHP Code
<?php
if ($username == '' or $secanswer !== 'Russia' ){
echo '<br><b>Mistake try again.</b>';
}else{
$salt = dechex(mt_rand(0,4321)) .dechex(mt_rand(0,4321));
$password = hash('sha256',$_POST['password']. $salt);
}
for ($round = 0; $round < 651255; $round++){
$password = hash('sha256',$password . $salt);
}
Now comes the part that I don't really understand... login.php
I want to log in , and if password and username are correct I will be redirected to xyz.php , that has if isset function , that checks the user if he is really logged in.
Any idea how I could make simple login page? I would appreciate small snippet etc...
I use mysqli
Thanks !
