Вот код:
?php
require_once "includes/config.php";
if (isset($_POST['search'])) {
header('Location: /search.php');
$word = mysqli_real_escape_string($connection, $_POST['search']);
$result = mysqli_query($connection, "SELECT * FROM videos WHERE title LIKE '%$word%'");
$end_result = '';
$ter = array();
while($row = mysqli_fetch_array($result)){
$ter[] = $row;
}
}
?>
Выдает ошибку ссылаясь на config.php Cannot modify header information - headers already sent by (output started at /home/..../www.site.ru/includes/config.php:1) in
Вот config
<?php
$config = array(
"title"=> site.ru",
"db" => array(
"server" => "localhost",
"username" => "username",
"password" => "password",
"name" =>"name")
);
require_once "db.php";