php: page not displaying anything

Posted on 2014-08-05
Last Modified: 2014-08-05
Hi all,

I have added some code to my page and all the text had gone:

Imusing ezmysql to connect to my database and the sites text has gone :

I have included my php page here<?php include('Include/Connection_to_db.php'); ?> in header.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "" >

<html xmlns="">
<meta http-equiv="Content-type" content="text/html;charset=UTF-8"/>
    <title>Running Profiles</title>
   <link href="rp.css" rel="stylesheet" type="text/css" />
	<?php include('Include/Connection_to_db.php'); ?>
<div id="header_container">
    <div id="header">
  <div id="titlehead">
Running Profiles   <div id="loginbutton" style="float:right;"> Login </div>
<div id="content">
<div id="content2">

Open in new window

but when adding the following code (which is Connect_to_mysql.php the page goes blank
ini_set('error_reporting', E_ALL);
include_once "../Mysql/ez_sql_core.php";
include_once "../Mysql/ez_sql_mysql.php";
$db = new ezSQL_mysql('username','password','table','localhost');

Open in new window

Question by:runnerjp2005

    Expert Comment

    by:John Moshayem

    I think you are new to PHP.
    Do you see this link?
    its connected to your sql but have no result.

    about blank page you must debug your code by turning the error reporting on or using $echo to solve step by step...

    And I should tell you about security, your website security is weak! just try the
    ' OR 1='1

    Open in new window

    in your index page as username and password, or also but single

    Open in new window

    in username and password field to see your security is very weak. I test only in a second,so maybe your website have a other security issues.
    LVL 107

    Expert Comment

    by:Ray Paseur
    ... when adding the following code ... the page goes blank
    This is a symptom of having an error, but having too low a level of error_reporting().  Production servers that do not expect errors use this technique to avoid exposing information that clients (and hackers) should not see.

    You have some choices to locate the error.  You can add these lines of code to the top of the PHP scripts that you're testing:

    ini_set('log_errors', TRUE);
    ini_set('display_errors', TRUE);

    Open in new window

    You can also set these options in the php_ini file.

    One workable solution I've used when I've been forced to work on poorly designed sites that were not subject to automated testing is to leave the display off and set the error_log on.  Then when the error_log file appears in the directories, I know I've gotten something that needs attention.  I don't recommend this for general use, but it's been an expedient way to deal with older sites.
    LVL 107

    Accepted Solution

    You might also want to spend a little time with this article.  In my opinion it's much easier to understand the basic technologies than it is to implement the abstraction layer, such as EZ-SQL.  You can be fairly sure that PHP and the extensions work correctly and are well-documented.  Not so sure about software that puts a donation begger into your web pages!

    Author Comment

    Hi Ray - taking in you suggestion wuld this site be a good place to start then
    LVL 107

    Expert Comment

    by:Ray Paseur
    That article looks pretty good to me.  There are some examples in the E-E article, too.
    LVL 107

    Expert Comment

    by:Ray Paseur
    Thanks for the points and thanks for using E-E, ~Ray

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
    Part of the Global Positioning System A geocode ( is the major subset of a GPS coordinate (, the other parts being the altitude and t…
    In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
    The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now