Blank page no errors show when having error_reporting enabled

Hi all,

i am having a problem with a php script i am developing and i have problems the php page called compare.php its showing a blank page no errror no nothing not sure what is causing it

This is my php code i have


include_once("dbconnect.php");
include("header.inc.php");
$r="SELECT * FROM players";
$rs=mysqli_query($con,$r);
if(!$rs)
{
	echo "Error".mysqli_error($con);
}
else
{
	$count=$rs->num_rows;
	if($count>0)
	{
		//
		while($data=$rs->fetch_assoc())
		{
			//
			require("dbconnect.php");
			$ld=$data['logindate'];
			$tc=$data['timecheck'];
			$u=$data['user'];
			$ut=$data['Units'];
			if($ld=$tc)
			{
				echo "";
			}
			else
			{
				//
				if($ld<$tc)
				{
					//echo "".$u."ld is".$ld."tc is".$tc."<br/>";
					$my_time = strtotime($ld); 
					$seconds = time() - $my_time;  
					$minutes = (int)($seconds / 60); 
					$hours = (int)($minutes / 60); 
					$m=(int)($minutes/900);
					//echo  "".$u."".$minutes."<br/>".$hours." so every 15 minutes&nbsp;".$u."&nbsp;will get&nbsp;".$m."<br/><br/>";
					update($m,$ut,$u);	
				}
				else
				{
					echo "";	
				}
				//
			}
			//
		}
		//
	}
}

For a start I would say add some echos to see where your script is getting to e.g. $count would be a good thing to check.
Adding something here instead of nothing could also reveal an error echo “”;

Use view source to check out what is actualy on your page as you may be able to see where the code has got to.

You need to enabled the display of errors:

error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', 1);

Where have you connected to the MySQL server and selected the database that you want to use?

that is in dbconnect.php

Do you have error display disabled in php.ini ?

There is a require(‘connect.php’) within the while loop that would certainly not be helping.

The fastest way to resolve this issue is to debug the code, add “echo” or “die” functions and execute the script in browser, thus you will find on what exactly string the script die.

yea i have fixed it.

Congrats.

thanks