Jump to content

Blank pages


cry of war

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.