i dont know why i am having an error in header
Warning: Cannot modify header information - headers already sent by (output started at delete.php on line 13
delete.php
<?php
include("db.php");
$id =$_REQUEST['BookID'];
// sending query
mysql_query("DELETE FROM books WHERE BookID = '$id'")
or die(mysql_error());
header("Location: index.php");
?>
db.php
<?php
$conn = mysql_connect('localhost', 'root', '');
if (!$conn)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("Books", $conn);
?>
:)