please help me
Warning: Cannot modify header information - headers already sent in C:\xampp\htdocs\gauto-preview\gauto-preview\login(1).php on line 19
<?php
ob_start();
session_start();
require_once('connexion.php');
error_reporting(E_ALL | E_WARNING | E_NOTICE);
ini_set('display_errors', TRUE);
if(isset($_POST['login'])){
$username=$_POST['username'];
$motpasse=$_POST['motpasse'];
if($username&&$motpasse){
$query="SELECT*from user where username='$username' AND motpasse='$motpasse'";
$query_run=mysqli_query($conn,$query);
$rep = mysqli_fetch_assoc($query_run);
if($rep!=''){
$_SESSION['id_user'] = $rep['id_user'];}
$row=mysqli_num_rows($query_run);
if($row==1){
flush();
header('Location: index(1).php');
exit();
//echo"<script type='text/javascript'>location.href='index(1).php';</script>";
//die('should have redirected by now');
}else{
echo "username ou password incorrect";
}
}else{
echo "veuillez saisir tous les champs";
}
}
?>