Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

PHP 

Login page - Decrypt password & Login

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
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 !


Possibly Related Threads...
Thread / Author Replies Views Last Post
[PHP] by SkidyDec 3, 2015 05:30 AM 26 714 Dec 3, 2015 05:30 AM
Last Post: Viktory
[PHP] by alphabotOct 23, 2012 11:43 AM 1 178 Oct 23, 2012 11:43 AM
Last Post: Dogs Toy