|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #69432 not able to use header
Submitted: 2015-04-12 18:09 UTC Modified: 2015-04-13 08:06 UTC
From: vijayjames003 at gmail dot com Assigned:
Status: Not a bug Package: Output Control
PHP Version: 5.5.23 OS: windows7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: vijayjames003 at gmail dot com
New email:
PHP Version: OS:


 [2015-04-12 18:09 UTC] vijayjames003 at gmail dot com
From manual page:

Test script:
function redirect($page = 'deleteStudent.php'){
 header("Location: $page");
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "loyola";
// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);

$sql = "DELETE FROM `studentdetails` WHERE `uniqueid` = '$uniqueid'" ;

$result = $conn->query($sql);
if(!$result )
echo "Deleted data successfully\n";
  echo('Could not delete the Uniqueid entered doesnot Exists: ' );


Expected result:
i wanted to delete the record and redirect the page

Actual result:
im getting  output as below:

Could not delete the Uniqueid entered doesnot Exists: 
Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\deleteStudent1.php:29) in C:\xampp\htdocs\deleteStudent1.php on line 31


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-04-13 08:06 UTC]
-Status: Open +Status: Not a bug
 [2015-04-13 08:06 UTC]
This is not a bug in the documentation (or PHP for that matter).

For more information see:

- (general support information)
- (the mysqli documentation pages)
- (the header documentation)
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Feb 29 15:01:32 2024 UTC