Answer the question
In order to leave comments, you need to log in
How to fix error in Header?
Hello, I made an authorization system, but after the cookie is activated to redirect the user, it displays the following ...
Warning: Cannot modify header information - headers already sent by (output started at P:\home\test1.ru\subdomain\logins.php:5) in P:\home\test1.ru\subdomain\logins.php on line 12
if(isset($_SESSION["session_username"])){
header("location:glav.php");
}
<?php require_once("includes/connection.php"); ?>
<?php
session_start();
?>
<?php require_once("includes/connection.php"); ?>
<?php include("includes/header.php"); ?>
<?php
Answer the question
In order to leave comments, you need to log in
I found an error, the problem was that the footer was sending the header, I deleted it and everything was fine.
This message indicates that you have already received a title from another location. And specifically, from the logins.php file, line 5. What do you have in it?
Check out the future . I think it will be useful. At the same time, you will understand what Rishat Kadyrov wrote to you about.
So it is written: the error occurred on line 12, and earlier information about the headers was sent on line 5 of the logins.php file. Look there.
This or another file has already sent headers.
Line 12 is not to blame for anything, look for the error above.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question