php: page not displaying anything

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 :http://runningprofiles.com/index.php

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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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'); ?>
   </head>
<body>	
<div id="header_container">
    <div id="header">
  <div id="titlehead">
Running Profiles   <div id="loginbutton" style="float:right;"> Login </div>
  </div>
     </div>
</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
<?php
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');
$db->debug();
?>

Open in new window

runnerjp2005Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

John MoshayemCommented:
Hi,

I think you are new to PHP.
Do you see this link? http://runningprofiles.com/Include/Connection_to_db.php
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.
0
Ray PaseurCommented:
... 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);
error_reporting(E_ALL);

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.
0
Ray PaseurCommented:
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!

http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/PHP_Databases/A_11177-PHP-MySQL-Deprecated-as-of-PHP-5-5-0.html
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

runnerjp2005Author Commented:
Hi Ray - taking in you suggestion wuld this site be a good place to start then http://codular.com/php-mysqli
0
Ray PaseurCommented:
That article looks pretty good to me.  There are some examples in the E-E article, too.
0
Ray PaseurCommented:
Thanks for the points and thanks for using E-E, ~Ray
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.