I have kind of a weird problem, which doesn't make any sense at all, i have a web page and for some reason there is a blank whitespace at the top of it, by removing code i have pinned it down that the problem is this include:
<?php
error_reporting(0);
include 'inc/inc.php';
include ("logMeIn.php");
?>
namely the logMein.php file, here are the contents of the file:
<?php
session_start();
include 'inc/inc.php';
$check = $conn->query("SELECT active FROM admin");
$check = $check -> fetch();
if ($check['active'] == 0){
exit("Вы превысили количество попыток, администратор заблокирован, свяжитесь с разработчиком");
}
if(isset($_POST['loginBtn'])){
$user = $_POST['loginName'];
$pass = md5($_POST['loginPass']);
$result = $conn -> query("SELECT adminName, adminPass FROM admin WHERE adminName ='$user' AND adminPass = '$pass'");
$count = $result->rowCount();
if($count != 0){
$_SESSION['admin'] = "admin";
$_SESSION['logAttempt'] = 0;
}else{
$_SESSION['logAttempt'] ++;
}
if($_SESSION['logAttempt'] > 3){
$conn -> query("UPDATE admin SET active = 0");
}
header('location:adminka.php');
}
if(isset($_POST['logOutBtn'])){
unset($_SESSION['admin']);
header('location:adminka.php');
}
?>
so it just validates the login and stuff, please don't judge the code, as i am new to php and mysql, i know its not secure. but here is the weird part, as you can see i've turned all the error reporting off this was intentional, i've tried deleting just the line that includes the file, the whitespace is gone, so i try to find something that could be the problem in the file, found nothing, deleted ALL of the contents in the logMeIn.php file, the whitespace is STLL there, how is this possible?
ps. if i let the errors in, there is no error, just this whitespace, it doesn't happen in mozilla, but chrome and ie do have this thing. Any help?