Hello, I wanted to know how to do when the user logs in, a message contained in this code appears:
<div class="alert alert-success" role="alert">
<strong>Login realizado com sucesso, aguarde o carregamento.</strong>
</div>
The login code to enter the account is this
if(isset($_POST['login'])) {
co();
$u = addslashes($_POST['username']);
$p = strtoupper(md5($_POST['password']));
$app = 'DanDanTang';
$uid = 0;
$data = array(
array($app, SQLSRV_PARAM_IN),
array($u, SQLSRV_PARAM_IN),
array($p, SQLSRV_PARAM_IN),
array($uid, SQLSRV_PARAM_OUT)
);
$check = sqlsrv_query($conn, "{CALL Mem_Users_Accede (?,?,?,?)}", $data);
sqlsrv_next_result($check);
if($uid <= 0)
{
**echo 'Aqui no caso ficaria o codigo de login realizado';**
}
else
{
q("Update Db_Tank.dbo.Sys_Users_Detail Set ActiveIP = '".$_SERVER['REMOTE_ADDR']."' Where UserName = '{$u}'");
$_SESSION['UserName'] = $u;
$_SESSION['UserId'] = $uid;
$_SESSION['PassWord'] = $p;
$_SESSION['Coin'] = loadCoin($uid);
$q = q("SELECT TOP 1 NickName FROM {$dbtank}.dbo.Sys_Users_Detail Where UserName = '{$u}'");
$info = qa($q);
$_SESSION['NickName'] = $info['NickName'];
$qe = q("SELECT TOP 1 UserID FROM {$dbtank}.dbo.Sys_Users_Detail Where UserName = '{$u}'");
$infoo = qa($qe);
$_SESSION['UserID'] = $infoo['UserID'];
echo '<script type="text/javascript">window.location="index.php";</script>';
exit();
}
}