I am not sure what i have done but for some reason my members area is a blank page i have tried to make the file alittle bit neat and cleaner for you guys.
and it doesnt show a blank page not sure exactly why you can see a demo of what i mean when i view the page at my testing url located at http://bccms.info/new/console.php
the login is demo for username and password here is my code for my problem.
Code PHP:include("functions.php"); $msg_pass=""; session_start(); error_reporting(E_ALL); $msg_user=""; require("dbconnect.php"); //session stuff if(isset($_SESSION['user'])) { // include("dbcoonect.php"); $gQuery="SELECT * FROM members WHERE username='".$_SESSION['user']."'"; //excute the query $rs=mysqli_query($con,$gQuery); if(!$rs) { echo "Error:Failed to executing query".mysqli_error($con); } else { $count=$rs->num_rows; if($count>0) { $data=$rs->fetch_assoc(); $user=$data['username']; } } else { } // } else { //start of cookies if(isset($_COOKIE['user'])) { // include("dbcoonect.php"); $gQuery="SELECT * FROM members WHERE username='".$_COOKIE['user']."'"; //excute the query $rs=mysqli_query($con,$gQuery); if(!$rs) { echo "Error:Failed to executing query".mysqli_error($con); } else { $count=$rs->num_rows; if($count>0) { $data=$rs->fetch_assoc(); $user=$data['username']; } } // } else { // echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"1; URL=index.php\">"; exit; // } //start of console code $gQuery="SELECT * FROM members WHERE username='".$user."'"; //excute the query $rs=mysqli_query($con,$gQuery); if(!$rs) { $dbError="Error:Failed to executing query".mysqli_error($con); } else { $count=$rs->num_rows; if($count>0) { $data=$rs->fetch_assoc(); $disable=$data['disable']; } } if($data['disable']=="0") { echo "Your Clan Account Has been Disabled"; } $gQuery="SELECT * FROM members WHERE username='".$user."'"; //excute the query $rs=mysqli_query($con,$gQuery); if(!$rs) { $dbError="Error:Failed to executing query".mysqli_error($con); } else { $count=$rs->num_rows; if($count>0) { $data=$rs->fetch_assoc(); $username=$data['username']; $rank=$data['rank']; $email=$data['email']; $aim=$data['aim']; $msn=$data['msn']; $recruitedby=$data['Recruitedby']; $joineddate=$data['joineddate']; $disable=$data['disable']; $logindays=$data['logindays']; $web=$data['web']; } } if($data['disable']=="1") { //Start of Non Disabled Members $rmt = $_SERVER["REMOTE_ADDR"]; if($rmt) { $pQuery="update members SET ips = \"$rmt\" WHERE username='".$user."'"; $result=mysqli_query($con,$pQuery); if(!$result) { echo "Error:".mysqli_connect_errno(); echo "<br/>Error2:".mysqli_error($con); } else { echo ""; } } $lQuery="SELECT * FROM Members WHERE username='".$user."'"; $rs=mysqli_query($con,$lQuery); if(!$rs) { $dbError="Error:Failed to executing query".mysqli_error($con); } else { $count=$rs->num_rows; if($count>0) { $data=$rs->fetch_assoc(); $username=$data['username']; $rank=$data['rank']; $email=$data['email']; $aim=$data['aim']; $msn=$data['msn']; $recruitedby=$data['Recruitedby']; $joineddate=$data['joineddate']; $disable=$data['disable']; $logindays=$data['logindays']; $web=$data['web']; $joineddate2=$data['joineddate2']; } } echo ""; switch(true) { case date('G')<13: echo "Good Morning $username"; break; case date('G')<18: echo "Good Afternoon $username"; break; case date('G')<25: echo "Good Evening $username"; break; } echo "<br/>The Time is: "; echo date("g:i a"); echo "";?> <style type="text/css"> .closed { display: none; } </style> <script type="text/javascript"> makeContainer = function(h2id, divid) { var h2 = document.getElementById(h2id); var div = document.getElementById(divid); h2.onclick = function() { div.className = div.className == "open" ? "closed" : "open"; } } makeContainer("profile", "profile-container"); </script> <h2 id="profile">Members</h2> <div id="profile-container" class="open"> <table width="390" border="1" align="center"> <tr> <th colspan="2"> <?php echo "Your Profile";?></th> </tr> </table> <?php //Start of Displaying Profile in Console ?><table> <tr><font size=\"10px\"><td><? echo "Member";?></td> <td><? echo ""; echo get_rank_by_id($rank); echo " ".$user."";?></td> </tr> <tr> <td><? echo "Email";?></td> <td><? echo "".$data['email']."";?></td> </tr> <tr> <td><? echo "Recruited By:";?></td> <td><? echo "".$data['Recruitedby']."";?></td> </tr> <tr> <td><? echo "Date Joined";?></td> <td><? echo "".$joineddate2."";?></td> </tr> <tr> <td>Days in Clan:</td> <td><?php $days=calcDays($username,$joineddate); if($days>=30 && $days<=67) { echo "1 Month In Clan"; } if($days>=68 && $days<=98) { echo "2 Months In Clan"; } if($days>=99 && $days<=128) { echo "3 Months In Clan"; } if($days>=129 && $days<=159) { echo "4 Months In Clan"; } if($days>=160 && $days<=189) { echo "5 Months In Clan"; } if($days>=190 && $days<=220) { echo "6 Months In Clan"; } if($days>=221 && $days<=251) { echo "7 Months In Clan"; } if($days>=252 && $days<=281) { echo "8 Months In Clan"; } if($days>=282 && $days<=312) { echo "9 Months In Clan"; } if($days>=313 && $days<=342) { echo "10 Months In Clan"; } if($days>=343 && $days<=373) { echo "11 Months In Clan"; } if($days>=374 && $days<=403) { echo "1 Year"; } //Year 1 if($days>=404 && $days<=431) { echo "1 Year and 1 Month In Clan"; } if($days>=432 && $days<=431) { echo "1 Year and 2 Months In Clan"; } if($days>=463 && $days<=492) { echo "1 Year and 3 Months In Clan"; } if($days>=493 && $days<=523) { echo "1 Year and 4 Months In Clan"; } if($days>=524 && $days<=553) { echo "1 Year and 5 Months In Clan"; } if($days>=554 && $days<=584) { echo "1 Year and 6 Months In Clan"; } if($days>=585 && $days<=615) { echo "1 Year and 7 MonthsIn Clan"; } if($days>=616 && $days<=645) { echo "1 Year and 8 Months In Clan"; } if($days>=646 && $days<=676) { echo "1 Year and 9 Months In Clan"; } if($days>=677 && $days<=706) { echo "1 Year and 10 Months In Clan"; } if($days>=707 && $days<=747) { echo "1 Year and 11 Months In Clan"; } // if($days==748 && $days<=777) { echo "2 Years"; } //Second Year if($days>=778 && $days<=806) { echo "1 Year and 1 Month In Clan"; } if($days>=806 && $days<=837) { echo "1 Year and 2 Months In Clan"; } if($days>=837 && $days<=867) { echo "1 Year and 3 Months In Clan"; } if($days>=867 && $days<=898) { echo "1 Year and 4 Months In Clan"; } if($days>=898 && $days<=928) { echo "1 Year and 5 Months In Clan"; } if($days>=928 && $days<=959) { echo "1 Year and 6 Months In Clan"; } if($days>=959 && $days<=990) { echo "1 Year and 7 Months In Clan"; } if($days>=990 && $days<=1020) { echo "1 Year and 8 Months In Clan"; } if($days>=1020 && $days<=1051) { echo "1 Year and 9 Months In Clan"; } if($days>=1051 && $days<=1080) { echo "1 Year and 10 Months In Clan"; } if($days>=1081 && $days<=1121) { echo "1 Year and 11 Months In Clan"; } // if($days>=1122 && $days<=1495) { echo "3 Years"; } if($days>=1496 && $days<=1869) { echo "4 Years"; } if($days>=1870) { echo "5 Years"; } //echo "You have been in the clan for $days Days";?></td> </tr> </table></div><?php //End of Display Console require("dbconnect.php"); $lQuery="SELECT * FROM members WHERE username='".$user."'"; $rs=mysqli_query($con,$lQuery); if(!$rs) { $dbError="Error:Failed to executing query".mysqli_error($con); } else { $count=$rs->num_rows; if($count>0) { $data=$rs->fetch_assoc(); $username=$data['username']; $rank=$data['rank']; $consoletype=$data['consoletype']; } } if($data['consoletype']=="1") { require("consoletype1.inc.php"); } else { require("consoletype2.inc.php"); } include("dbconnect.php"); $cQuery="select * from news where status='Members'"; $rs=mysqli_query($con,$cQuery); if(!$rs) { echo "Error:".mysqli_error($con); } else { $count=$rs->num_rows; if($count>0) { echo "<br/><br/><table border='0'> <tr> <th>Clan Names</th> </tr>"; while($data=$rs->fetch_assoc()) { echo "<tr> <td>Posted by:".$data['author']."</td> <td>Subject:".$data['subject']."</td> </tr> <tr> <td colspan='2'>".$data['content']."</td> </tr>"; } echo "</table><br/><br/>"; } else { echo "<br/><br/>No Clan News At the Moment"; } //end of console end } //End of Console // } include("footer.inc.php");
can you help me fix my php code and tell me why its displaying a blank page?
any help would be good thanks.




Bookmarks