i have this code,why my header location not working? its a form of updating and editing and deleting some pages in my control panel...and i have an index.php file in the sam
just use ob_start();
before include function it will help
Remove Space
Correct : header("Location: home.php"); or header("Location:home.php");
Incorrect : header("Location :home.php");
Remove space between Location and : --> header("Location(remove space): home.php");
I use this
header("Location:comments.php");
And it solve out..
That is because you have an output:
?>
<?php
results in blank line output.
header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP
Combine all your PHP codes and make sure you don't have any spaces at the beginning of the file.
also after header('location: index.php');
add exit();
if you have any other scripts bellow.
Also move your redirect header after the last if
.
If there is content, then you can also redirect by injecting javascript:
<?php
echo "<script>window.location.href='target.php';</script>";
exit;
?>
Check if below are enabled
bz, mbstring, intl, ioncube_loader and Json extension.
Create config.php and put the code it will work