Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(isset($_SESSION['email'])):
- include('verifica_login.php');
- ?>
- <img id="char" src="IMAGENS/ICONES/char2.ico" alt=""> <br>
- <h2 style="color:white;font-size:13px">Olá, <?php echo $_SESSION['email'];
- ?></h2>
- <h2 style="color:white;font-size:13px"><a href="logout.php">Sair</a></h2>
- <?php
- endif;
- ?>
- <?php
- session_start();
- include('coneccao.php');
- if(empty($_POST['email']) || empty($_POST['senha'])){
- header('Location: HOME.php');
- exit();
- }
- $email = mysqli_real_escape_string($con, $_POST['email']);
- $senha = mysqli_real_escape_string($con, $_POST['senha']);
- $query = ("select nome from usuario where email = '{$email}' and senha = md5('{$senha}')");
- $result = mysqli_query($con,$query);
- $row = mysqli_num_rows($result);
- if($row == 1){
- $_SESSION['email'] = $email;
- header('Location: HOME.php');
- exit();
- }else{
- $_SESSION['nao_autenticado'] = true;
- header('Location: HOME.php');
- exit();
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement