cry of war Posted October 15, 2007 Share Posted October 15, 2007 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> Quote Link to comment https://forums.phpfreaks.com/topic/73341-blank-pages/ Share on other sites More sharing options...
BlueSkyIS Posted October 15, 2007 Share Posted October 15, 2007 are you seeing a syntax error or a blank page? if it's a syntax error, you shouldn't see a blank page if you have error_reporting turned on, which it looks like you do. Quote Link to comment https://forums.phpfreaks.com/topic/73341-blank-pages/#findComment-370041 Share on other sites More sharing options...
cry of war Posted October 15, 2007 Author Share Posted October 15, 2007 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> Quote Link to comment https://forums.phpfreaks.com/topic/73341-blank-pages/#findComment-370044 Share on other sites More sharing options...
BlueSkyIS Posted October 15, 2007 Share Posted October 15, 2007 hm, it sounds like something's not working properly. when I load your code, i get Parse error: syntax error, unexpected '<', expecting ')' in /Users/lesbrown/Sites/site1/test.php on line 17 that line should probably be more like printf("<td>{$row[Name]}</td>"); Quote Link to comment https://forums.phpfreaks.com/topic/73341-blank-pages/#findComment-370046 Share on other sites More sharing options...
cry of war Posted October 15, 2007 Author Share Posted October 15, 2007 ok new question then why is my error reporting not working right ??? Quote Link to comment https://forums.phpfreaks.com/topic/73341-blank-pages/#findComment-370052 Share on other sites More sharing options...
BlueSkyIS Posted October 15, 2007 Share Posted October 15, 2007 don't know, it may be overridden in your include() databaseconnect.php? Quote Link to comment https://forums.phpfreaks.com/topic/73341-blank-pages/#findComment-370054 Share on other sites More sharing options...
cry of war Posted October 15, 2007 Author Share Posted October 15, 2007 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) Quote Link to comment https://forums.phpfreaks.com/topic/73341-blank-pages/#findComment-370056 Share on other sites More sharing options...
cry of war Posted October 15, 2007 Author Share Posted October 15, 2007 does anyone know whats going on???? please help im begging you Quote Link to comment https://forums.phpfreaks.com/topic/73341-blank-pages/#findComment-370095 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.