Jump to content

Recommended Posts

Is there any way to make the page show how far the php file got before it got a syntax error and makes a white page because I have some larger files that do this same thing and I dont know why. I have the code that shows you what is wrong with the web page but it still shows up white here is the code

 

<?php
ini_set('display_errors', '1');
error_reporting(E_ALL);
include "databaseconnect.php";
?>
<?PHP
$table1="affinityalignment";
?>
<head>
<title></title>
</head>
<body>
<table>
<?php $result = mysql_query("SELECT * FROM $table1 ");// table1
ECHO "<TR>";
while ($row = mysql_fetch_array($result, MYSQL_BOTH)) {
    printf(<td>$row[Name]</td>);
}
ECHO "</TR>";
?>
<?php 
$number="1";
$max= mysql_query("SELECT COUNT(name) FROM $table1 ");
while ($number <= $max) {
$number++;
$result = mysql_query("SELECT * FROM $table1 ");// table1
ECHO "<TR>";
while ($row = mysql_fetch_array($result, MYSQL_BOTH)) {
    if ($number="1") {printf(<td>$row[$number]</td>);}
else {printf(<input type="text" value="$row[$number]" name="$row[$number]">);}
}
ECHO "</TR>";
}
?>
</table>
</body>

Link to comment
https://forums.phpfreaks.com/topic/73341-blank-pages/
Share on other sites

just a blank page no errors at top no nothing and this is what the html output looks like

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1"></HEAD>
<BODY></BODY></HTML>

Link to comment
https://forums.phpfreaks.com/topic/73341-blank-pages/#findComment-370044
Share on other sites

databaseconnect.php

<?php
/***MySQLconnect***/
$host="localhost";
$user="*****";
$password="*******";
/***databaseconnect***/
$databasename= "game";
/****coding****/
$link = mysql_connect("$host", "$user", "$password");
if (!$link) {
die("Could not connect: " . mysql_error());
}
$db_selected = mysql_select_db("$databasename");
if (!$db_selected) {
die("Could not select database: " . mysql_error());
}
?>

 

?????? this one works fine from what I seen I tested it a few times

 

(edited by kenrbnsn to remove username/password)

Link to comment
https://forums.phpfreaks.com/topic/73341-blank-pages/#findComment-370056
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.