php header works fine with local host but does not work with real server : I am trying to header my page in real server but it does not work, I try it in xamp localhost it work fine :|?

    if(empty($_POST)===false){
    		include_once("db.php");
    		$username = $_POST['user'];
    		$pwd = $_POST['pwd'];
    		
    		$rs = mysqli_query($con,"select *from admin_acc where username = '".$username."'");
    		$num_rows = mysqli_num_rows($rs);
    		
    		if($num_rows > 0){
    		while($rows = mysqli_fetch_assoc($rs))
    		{
    			$db_username = $rows['username'];
    		}
    		
    		if($username == $db_username && md5($pwd) == $db_password){
    			$_SESSION['username'] = $db_username;

    			//Header to Home Page
    			header('Location: customers.php');
    
    		}else{
    			$wrng_pwd = "Wrong Password!";	
    			$msg_type = 1;
    		}
    		}else{
    			$user_nt = "User name not exsit!!";	
    			$msg_type = 2;
    		}
    	}

So can you please help me guys? because I was looking for the answer throw the internet but I have not find a good answer