Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/bclages/public_html/bc/conexao.php:11) in /home/bclages/public_html/bc/login.php on line 23
Warning: session_register(): Cannot send session cache limiter - headers already sent (output started at /home/bclages/public_html/bc/conexao.php:11) in /home/bclages/public_html/bc/login.php on line 26
Warning: Cannot modify header information - headers already sent by (output started at /home/bclages/public_html/bc/conexao.php:11) in /home/bclages/public_html/bc/login.php on line 27
Código de login:
CODE
<?php
//Arquivo de configuração (faz a conexão com o BD)
include "conexao.php";
//Verifica se o login e senha estão cadastrado no banco de dados
$sql = "SELECT * FROM membros WHERE login = '$login' AND senha = '$senha'";
Pergunta
cm8
5QUOTE
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/bclages/public_html/bc/conexao.php:11) in /home/bclages/public_html/bc/login.php on line 23
Warning: session_register(): Cannot send session cache limiter - headers already sent (output started at /home/bclages/public_html/bc/conexao.php:11) in /home/bclages/public_html/bc/login.php on line 26
Warning: Cannot modify header information - headers already sent by (output started at /home/bclages/public_html/bc/conexao.php:11) in /home/bclages/public_html/bc/login.php on line 27
Código de login:
CODE
<?php
//Arquivo de configuração (faz a conexão com o BD)
include "conexao.php";
//Verifica se o login e senha estão cadastrado no banco de dados
$sql = "SELECT * FROM membros WHERE login = '$login' AND senha = '$senha'";
$rs = mysql_query($sql);
$tot = mysql_num_rows($rs);
//Verificando login e senha
if ($tot == 0) {
header("Location:index.php?msg=Login e/ou senha inválidos");
}
else {
$sql2 = "SELECT * FROM membros WHERE login = '$login'";
$logado = mysql_fetch_array(mysql_query($sql2));
$email = $logado;
$id = $logado[id];
$nome = $logado[nome];
$aniversario = $logado[nascimento];
session_start("login");
session_name();
session_destroy();
session_register("login","senha","email","nome","id","aniversario");
header("Location:minhaconta.php");
exit;
}
?>
--------------------
Michael<br>
Link para o comentário
Compartilhar em outros sites
3 respostass a esta questão
Posts Recomendados
Participe da discussão
Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.