When i test out my script i get this error
Warning: Cannot modify header information - headers already sent by (output started at /nfs/c06/h04/mnt/153892/domains/authomotive.com/html/artpoint/gallery/index.php:12) in /nfs/c06/h04/mnt/153892/domains/authomotive.com/html/artpoint/gallery/main.php on line 17
wich ofcourse we all know I removed all the spaces in the other files and add ob_start() and ob_flush() to the files what can i do more? do I have to just find another way to send the headers or is there another way to bypass this warning?
the script removes a file from my database and my maps.
source of main.php
<?php
ob_start();
if(isset($_GET['remove'])){
$id=$_GET['id'];
include('conf.php');
require_once('classes/db.class.php');
$db = new DB($db_name,$db_host,$db_user,$db_passw);
$q = $db->query('SELECT photourl,minurl,projectID FROM photo WHERE id='.$id);
while ($line = $db->fetchNextObject()) {
$file = $line->photourl;
unlink($file);
$filemin = $line->minurl;
unlink($filemin);
}
//$db->execute('DELETE FROM project WHERE id='.$line->projectID,true);
$db->execute('DELETE FROM photo WHERE id='.$id);
header("Location:index.php");
}
if(isset($_GET['success'])){
echo('het werkt');
}
ob_flush();
?>
<h1> Projecten </h1>
<ul id="edit-menu">
<li>
<ul>
<li><a class="addPro" href="#"><img src="images/addProject.png" /></a></li><br/>
<li><a class="add" style="padding-left:15px"href="#">Project +</a></li>
</ul>
</li>
<li>
<ul>
<li><a class="addPho" href="#"><img src="images/add.png" /></a></li><br/>
<li><a class="add" href="#">Toevoegen </a></li>
</ul>
</li>
<li>
<ul>
<li><a class="deletePho" href="#"><img src="images/delete.png" /></a></li><br/>
<li><a href="#">Verwijderen </a></li>
</ul>
</li>
<div id="addproject">
<?php include('addproject.php'); ?>
</div>
<div id="addphoto">
<?php include('addphoto.php'); ?>
</div>
<div id="deletephoto">
<?php include('removePhoto.php'); ?>
</div>
</ul>