Php Code Breaks Background and Tables
<p>The code below breaks my page... no wallpaper or tables are shown. The only thing shows is the logo and the login form. The form suppose to log me in then show my account name and some numbers.How to fix the below code?</p>

<pre><code>    &lt;?php

   include 'wasudf.php';

   //
   // get session id
   //
   $SessionID = $_GET['SessionID'];

   if (!$SessionID)
      $SessionID = $_POST['SessionID'];

   if (!$SessionID)
       $SessionID = $_COOKIE['SessionID'];

   if (!$Function)
      $Function = $_GET['FunkShun'];

   if (!$Function)
      $Function = $_POST['FunkShun'];

   if (!$Function)
      $Function="Home";

   if (!$SessionID)
      {

echo'     &lt;form action="index.php" method="post" id="LoginForm" style="color:#FFF"&gt;';
echo'     &lt;input type="hidden" name="SessionID" value="new"&gt;&lt;/input&gt;';
echo'     Username:';
echo'     &lt;label&gt;';
echo'     &lt;input type="text" name="AccountNo" value="" class="input" size="28"&gt;&lt;/input&gt;';
echo'     &lt;/label&gt;';
echo'     &lt;BR /&gt;&lt;BR /&gt;';
echo'     &amp;nbsp;&amp;nbsp;Password:';
echo'    &lt;label&gt;';
echo'    &lt;input type="password" name="Password" value="" class="input" size="30"&gt;&lt;/input&gt;';
echo'    &lt;/label&gt;';
echo'     &lt;BR /&gt;&lt;BR /&gt;';
echo'    &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;input type="image" src="images/input-img.gif" value="Log On" class="input-img"&gt;&lt;/input&gt;';
echo'    &lt;BR /&gt;&lt;br /&gt;';
echo'    &lt;a href="#" class="link" style="font-size:12px;"&gt;Register now!&lt;/a&gt;   &lt;a href="#" style="font-size:12px;"&gt;Forgotten your password?&lt;/a&gt; ';
echo'    &lt;/form&gt;';

return;
      }

   //
   // this is a new session - add to web session table
   //
   if ($SessionID == "new")
      {
      $AccountNo = check_input(strtoupper(trim($_POST['AccountNo'])));
      $Password = check_input(strtoupper(trim($_POST['Password'])));

      if (!$AccountNo)
         ExitLogOn("Invalid Account/Password");

      $rs=mysql_query("select * from accounts where code='$AccountNo' and password='$Password'",$db);
      $row=mysql_fetch_array($rs);

      if (!$row)
         ExitLogOn("Invalid Account/Password!");

      mysql_query("update system set nextsession = nextsession + 1",$db);

      $rs=mysql_query("select * from system",$db);
      $row=mysql_fetch_array($rs);

      $SessionID = $row['nextsession'];

      //
      // ensure this session does not exist already
      // also remove any sessions belonging to this account
      //    - ie account can only be logged on one workstation at any time
      //
      mysql_query("delete from websession where sessionid='$SessionID' or account='$AccountNo'",$db);

      $Expiry=strtotime("+1 hour");

      $xCommand = "insert into websession set ";
      $xCommand = $xCommand . "sessionid='$SessionID',";
      $xCommand = $xCommand . "ipaddress='" . $_SERVER['REMOTE_ADDR'] . "',";
      $xCommand = $xCommand . "account='$AccountNo',";
      $xCommand = $xCommand . "password='$Password',";
      $xCommand = $xCommand . "date='" . date('YmdHis',$Expiry) . "'";

      mysql_query($xCommand,$db);
      }

   $rs=mysql_query("select * from websession where sessionid='$SessionID'",$db);
   $row=mysql_fetch_array($rs);

   if (!$row)
      {
      mysql_query("delete from websession where sessionid='$SessionID'",$db);
      mysql_query("delete from elist where code='$SessionID'",$db);
      ExitLogOn("Session Expired");
      }

   if ($row['date'] &lt; date('YmdHis'))
      {
      mysql_query("delete from websession where sessionid='$SessionID'",$db);
      mysql_query("delete from elist where code='$SessionID'",$db);
      ExitLogOn("Session Expired!!");
      }

   $Expiry=strtotime("+1 hour");

   $xCommand = "update websession set ";
   $xCommand = $xCommand . "date='" . date('YmdHis',$Expiry) . "'";
   $xCommand = $xCommand . "where sessionid='$SessionID'";

   mysql_query($xCommand,$db);

   $AccountNo = $row['account'];
   $Password = $row['password'];
   $MiscData = $row['data'];

   $rs=mysql_query("select * from accounts where code='$AccountNo' and password='$Password'",$db);
   $row=mysql_fetch_array($rs);

   if (!$row)
      ExitLogOn("Invalid Account/Password!!");

   $Name = trim($row['name']);
   $Balance = $row['balance'];

      if ($Function == "Home")
      {
      echo '&lt;form action="' . $_SERVER['SCRIPT_NAME'] . '" method="post"&gt;';
      echo '&lt;input type="hidden" name="SessionID" value="' . $SessionID . '"&gt;&lt;/input&gt;';
      echo '&lt;table width=800 align=center&gt;';

      echo '   &lt;tr&gt;';
      echo '      &lt;td align=center colspan="4" style="color:#F93;"&gt;';
      echo           $Name;
      echo '      &lt;/td&gt;';
      echo '   &lt;/tr&gt;';

      echo '   &lt;tr&gt;';
      echo '      &lt;td align=center colspan="4" style="color:#F93;"&gt;';
      echo '         Current Balance $ ' . snumber($Balance,10);
      echo '      &lt;/td&gt;';
      echo '   &lt;/tr&gt;';

      echo '   &lt;tr&gt;';
      echo '      &lt;td align=center colspan="4"&gt;';
      echo '         &amp;nbsp';
      echo '      &lt;/td&gt;';
      echo '   &lt;/tr&gt;';

      echo '&lt;/table&gt;';
      echo '&lt;/form&gt;';
      }

?&gt;
</code></pre>
