Jump to content
Fórum Script Brasil
  • 0

(Resolvido) Warning: session_start()


keven jesus

Question

Fala galera do script brasil , seguinte to com projeto aqui de um painel só que eu todo felizão , em localhost funciona tudo perfeitamente

agora joguei na rede deu error logo no logar "/

<?php
session_start();
include"config.php";
$usuario = $_POST['usuario'];
$senha = $_POST['senha'];

$sql = mysql_query("SELECT * FROM usuarios WHERE usuario = '$usuario' and senha = '$senha'");
if(mysql_num_rows($sql)== true){
   while($pega = mysql_fetch_array($sql)){
      
      $_SESSION['usuario'] = $pega['usuario'];
      $_SESSION['senha'] = $pega['senha'];
      
      header("location: ../logado.php");
      
      
      }// loop dos uaurios
   
   
   }else{
      echo "<meta http-equiv='refresh' content='0; URL=../index.php'>
            &lt;script type='text/javascript'>alert('Usuario ou senha invalidos , tente de novo!')</script>
            ";
      
      }

?>

localhost tudo as mil maravilhas ,

agora online error se usuario ou senha invalidos

KiFSl.png

se usuario e senha bater , ele não aparece a msg ao que aparenta ele loga

mais aparece seguinte error

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/kevencom/public_html/clientes/zara/admin/modulo/logar.php:1) in /home/kevencom/public_html/clientes/zara/admin/modulo/logar.php on line 2

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/kevencom/public_html/clientes/zara/admin/modulo/logar.php:1) in /home/kevencom/public_html/clientes/zara/admin/modulo/logar.php on line 2



Warning: Cannot modify header information - headers already sent by (output started at /home/kevencom/public_html/clientes/zara/admin/modulo/logar.php:1) in /home/kevencom/public_html/clientes/zara/admin/modulo/logar.php on line 14

alguém tem ideia do que seja

o error esta online em

http://www.keven.com.br/clientes/zara/admin

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652.1k
×
×
  • Create New...