Completed

Erro no comando header do php

Published on the February 14, 2017 in IT & Programming

About this project

Open

Para quem ja passou por isto para que possa me ajudar em carater de urgencia

Começou a dar erro no meu site todo comando header.

Este é o erro. Na tela de login
Warning: Cannot modify header information - headers already sent by (output started at

<form method="post" action="">
<input type="button" value="Questões exemplo" onclick="location.href='http://concursosrespostacerta.com.br/filtropesquisalimitado.php' "><br><br><br />
<label>Usuário</label>
<input type="text" name="login" maxlength="50" />
<label>Senha</label>
<input type="password" name="senha" maxlength="50" />
<input type="submit" name="entrar" value="Entrar" />
<input type="button" value="Cadastrar" onclick="location.href='http://www.concursosrespostacerta.com.br/login/cadastro.php' ">
</form>
<a href="lembrarsenha.php">Esqueci minha senha</a><br><br />
<label>Para ter acesso a todas as questões, efetuar o pagamento na aba pagamentos ou mandar um e-mail para concursosacerta@gmail.com que enviaremos a conta para deposito e logo tera acesso as questões. </Label>





<?php

header('Content-Type: text/html; charset=UTF-8'); // erro aqui
require_once('conecta.php');

if(isset($_POST['entrar'])):
        $login=$_POST['login'];
        $ip=$_SERVER["REMOTE_ADDR"];;
           
     
              if (ip($dados=array(
            'login'=>$login,
            'ip'=>$ip
   
        ))):
            if(listarlogin($login, base64_encode($_POST['senha']))){
              $dataAtual = date('Y-m-d');    
              $strUltimoLogin = "update login set UltimoLogin = '$dataAtual' where login = '$login';";
              $qrUltimoLogin = mysqli_query($conexao,$strUltimoLogin);
            header("Location:http://www.concursosrespostacerta.com.br/filtropesquisa.php");}  // erro aqui acima
            else{
                echo "Login ou Senha errada";
                        header("Location:http://www.concursosrespostacerta.com.br/filtropesquisalimitado.p
hp");}
//erro aqui acim
        endif;
         
endif;
?>

Category IT & Programming
Subcategory Web development
What is the scope of the project? Small change or bug
Is this a project or a position? Project
Required availability As needed
Roles needed Developer

Delivery term: Not specified

Other projects posted by Elisa F.