Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8833883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:53:24+00:00 2026-06-14T08:53:24+00:00

The code below breaks my page… no wallpaper or tables are shown. The only

  • 0

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?

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

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'] < 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 '<form action="' . $_SERVER['SCRIPT_NAME'] . '" method="post">';
      echo '<input type="hidden" name="SessionID" value="' . $SessionID . '"></input>';
      echo '<table width=800 align=center>';

      echo '   <tr>';
      echo '      <td align=center colspan="4" style="color:#F93;">';
      echo           $Name;
      echo '      </td>';
      echo '   </tr>';

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

      echo '   <tr>';
      echo '      <td align=center colspan="4">';
      echo '         &nbsp';
      echo '      </td>';
      echo '   </tr>';

      echo '</table>';
      echo '</form>';
      }

?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T08:53:26+00:00Added an answer on June 14, 2026 at 8:53 am

    you’re using both GET and POST on the same page.

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

    And what’s with all the reassigning of $Function?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The code below will validate required fields within currently visible fieldsets, but only if
I usually use this code below to include the page that I need into
New programmer here, I am trying to understand and break down this code below
How can I line break OHAttributedLabel ? My below code didn't work. OHAttributedLabel *lbl
Code below is working well as long as I have class ClassSameAssembly in same
Code below is used to save PostgreSql database backup from browser in Apache Mono
The code below simply didn't work. document.getElementById('files').addEventListener('change', handleFileSelect, false); reported by firebug that this
This code below allows me to find the word error in all my files
The code below fails on the line: Class.forName(oracle.jdbc.driver.OracleDriver); with the error: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver The
My code below gave a different length for the unsigned char pointer I expect.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.