How to apply this Login class on my Login form?

0
     <?php 
        if (!empty($_POST)) {
            // Recebendo dados do Formulário
            $usuario = $Modulo->NoSqlInject((isset($_POST['usuario'])) ? $_POST['usuario'] : NULL);
            $senha   = $Modulo->NoSqlInject((isset($_POST['senha'])) ? $_POST['senha'] : NULL);
            // Iniciando o processo de conexão 
            $Usuario->LogarUsuario($usuario, $senha, '/index.php');
        }
    ?>
    <div class="login-box-body">
        <p class="login-box-msg">Faça login para iniciar sua sessão!</p>
        <form method="POST">
            <div class="input-group has-feedback">
                <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
                <input type="text" class="form-control" name="usuario" placeholder="Digite o nome de usuário" required>
            </div>

            <div class="input-group has-feedback" style="margin-top: 3%;">
                <span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
                <input type="password" class="form-control" name="senha" placeholder="Digite a senha do usuário" required>
            </div>

            <div class="row" style="margin-top: 3%;">
                <div class="col-xs-8">
                    <div class="checkbox icheck">
                        <label><input type="checkbox" name="rememberme" value="rememberme"> Lembrar-me</label>
                    </div>
                </div>

                <div class="col-xs-4">
                    <input type="submit" class="btn btn-primary btn-block btn-flat" value="Acessar"></input>
                </div>
            </div>
        </form>
    </div>

above is my form, but so far so good, it works normal.

The $Usuario->LogarUsuario($usuario, $senha, '/index.php'); it does its verification process and creates the $_SESSION normal, but this is where I need help, I want to put these $_SESSION to work out, follow below my User.class. php

User.class.php Well, if there are any errors help me, and I need to "Remember my Password" also from the outside, everything is there the script.

    
asked by anonymous 24.03.2018 / 21:23

0 answers