25.10.2016, 17:40
Hey everybody, i just configured a Panel for my samp server that dosen't had Encryption when you login, i added it succesfuly but my question is: Is safe to do this this way?
After my edit:
Before:
After my edit:
Код:
$q = Config::$g_con->prepare('SELECT * FROM `playerinfo` WHERE `Name` = ? AND `Pass` = ?'); $q->execute(array($_POST['username_'],hash( 'whirlpool',$_POST['password_']))); if($q->rowCount()) { $d = Config::$g_con->prepare('SELECT * FROM `panel_restrict` WHERE `PlayerName` = ?'); $d->execute(array($_POST['username_'])); $row1 = $d->fetch(PDO::FETCH_OBJ);
Код:
$q = Config::$g_con->prepare('SELECT * FROM `playerinfo` WHERE `Name` = ? AND `Pass` = ?'); $q->execute(array($_POST['username_'],$_POST['password_'])); if($q->rowCount()) { $d = Config::$g_con->prepare('SELECT * FROM `panel_restrict` WHERE `PlayerName` = ?'); $d->execute(array($_POST['username_'])); $row1 = $d->fetch(PDO::FETCH_OBJ);