I seem to keep getting this error: Cannot modify header information - headers already sent by...
I don't understand what I am doing wrong. The header file is just a normal header... view code
The weird thing is, it works without any errors on wampserver, but it has this error on a hostingserver.
I tied to check for white spaces and weird outputs, but cannot find any?
<?php
require 'header.php';
require 'includes/dbh.inc.php';
// Search system
if (isset($_POST['submit'])){
$aMust = $_POST['must'];
$aOptional = $_POST['optional'];
$category = $_POST['category'];
if ($_POST['category'] == "Breedables"){
header("Location: categories/breedables.php?must=".$aMust."&optional=".$aOptional);
exit();
} else if ($_POST['category'] == "Jobs"){
header("Location: categories/jobs.php?must=".$aMust."&optional=".$aOptional);
exit();
}
}