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

  • Home
  • SEARCH
  • 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 9322977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T04:13:45+00:00 2026-06-19T04:13:45+00:00

I’ve been having a really annoying error… My page have a header, left sidebar

  • 0

I’ve been having a really annoying “error”…
My page have a header, left sidebar and a footer. After i submit the form everything goes really good EXCEPT now the footer is in the middle of the page!! I tried everything i knew to and searched but i still can’t solve that.

BEFORE SUBMIT with footer on the right place : http://i48.tinypic.com/ly1dl.jpg
AFTER SUBMIT with footer on the middle of the page : http://i47.tinypic.com/168a3uq.jpg

Here is The code :

Header:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="stylesheets/stylesheet.css" type="text/css" rel="stylesheet" />
<title>Wilson Electric & Alarm Company</title>
</head>
<body>
<div id="header">
<h1 id="toptitle"> Wilson Electric & Alarm Company </h1>
</div>
<div id="navigation_top">
</div>
<div id="column_left">
 <ul id="left_menu">
 <li> <a href="testing2.php"> Insert Page </a> </li>
 <li> <a href="search.php"> Search Page </a> </li>
 <li> <a href=""> Menu 4 </a> </li>
 <li> <a href=""> Menu 5 </a> </li>
 <li> <a href=""> Menu 6 </a> </li>
 <li> <a href="user.php"> User  </a> </li>
 <li> <a href="admin.php"> Admin  </a> </li>
 <li> <a href="login.php"> Login </a> </li>
 <li> <a href="create_username.php"> Create Username </a> </li>
 </ul>
 </div>
 <div id="content"> 

Footer :

</div>
<div id="footer">
This is a Footer.
</div>
</body>
</html>

Stylesheet : (there is also a default reset in my stylesheet before the #container)

#container {
width:100%;
height:100%;
}   
#header {
width: 100%;
height:120px;   
}
#column_left {  
float:left;
width:15%;
height:100%;
border-right: 3px solid #06F;
border-left: 3px solid #06F;    
}
#content {
width:100%;
height:100%;
}

#footer {

width:100%;
height: 30px;
border-top:3px solid #06F;
}
#navigation_top {
width:100%;
height:15px;
border-bottom:3PX solid #06F;
}
#toptitle {
padding:30px;
font-size:300%;
font-weight:700;
}
.formtitle {
font-weight:800;
font-size:150%;
}
#form {
margin-left:230px;
padding-top:30px;
}
table,th, td {
border: 1px solid black;
}
table {
width:1024px;
}
th {
font-weight:800;
background-color:#0FF;
}

And here is the page code that is giving me those problems!!

<?php require_once("includes/connection.php"); ?>
<?php require_once("includes/functions.php"); ?>
<?php   

if (isset($_POST['search'])) {

$date1 = mysql_prep($_POST['date1']);
$date2 = mysql_prep($_POST['date2']);
$latte = mysql_prep($_POST['latte']);
$coffee = mysql_prep($_POST['paid']);

$query = "SELECT * 
          FROM payroll  
          WHERE (day BETWEEN '{$date1}' AND '{$date2}')
          AND (company = '{$latte}')  
          AND (paid = '{$coffee}')  
          ORDER BY day ASC ";

$result = mysql_query($query, $connection);     

$woof = "SELECT SUM(p.hours) AS sum_hours 
 , COUNT(DISTINCT p.day) AS cnt_days 
 FROM PAYROLL p 
 WHERE p.day BETWEEN '{$date1}' AND '{$date2}'  
 AND company = '{$latte}'  
 AND paid = '{$coffee}' ";

$raw = mysql_query($woof, $connection);
if(!$raw) { die(mysql_error());}
$meow = mysql_result($raw, 0, 0);
$days = mysql_result($raw, 0, 1);



if(!$result) {
    echo "FAIL"; 
     } else { 

     $message = "<table>
<tr>
<th> Date </th>
<th> Hours </th>    
<th> Job Title </th>
<th> Job Description </th>
<th> For </th>
<th> Paid </th>
</tr>";

while($row = mysql_fetch_array($result)) {


$company = $row['company']; 

if($company == 0) {
$company = "Wilson Electric";
} if($company == 1) {
    $company = "Wilson Rental";
    } if ($company == 2) {
        $company = "Church of Christ";
        }

$paid = $row['paid'];
    if($paid == 0) {
        $paid = "Yes";
        } else {
            $paid = "<form action=\"update.php\" method=\"post\" ><input type=\"checkbox\" name=\"paid\" value=\"0\"> NO ";
            }


$message .= "<tr>";
$message .=  "<td class=\"center\">" . $row['day'] . "</td>";
$message .=  "<td class=\"center\">" . $row['hours'] . "</td>";
$message .= "<td style=\"padding:5px;\">" . $row['job_title'] . "</td>";
$message .=  "<td style=\"padding:5px;\">" . $row['job_description'] . "</td>";
$message .=  "<td style=\"padding:5px;\">" . $company . "</td>";
$message .=  "<td class=\"center\">" . $paid . "</td>"; 

$message .=  "</tr>";
}
$message .=  "<tr>";
$message .=  "<td class=\"center\"> Total Days:  " . $days . "</td>";
$message .=  "<td class=\"center\"> Total Hours: " . $meow . "</td>";
$message .=  "<td class=\"center\"> &nbsp; </td>";
$message .=  "<td class=\"center\"> &nbsp; </td>";
$message .=  "<td class=\"center\"> &nbsp; </td>";
$message .=  "<td class=\"center\"> <input type=\"submit\" name=\"gamind\" value=\"Update\"> </form> </td>";
$message .=  "</tr>";
}
}


?>  
<?php include("includes/header.php"); ?>
<form action="" method="post" id="form">
<h1 class="formtitle"> Search </h1>
<br />

<table id="table1">
<th> From </th>
<th> To   </th>
<th> For </th>
<th> Paid </th>
<tr>
<td>
<input type="date" name="date1" value="" > 
</td>   
<td>
<input type="date" name="date2" value="" > 
</td>
<td>
<select name="latte" >
<option value="0"> Wilson Electric </option> 
<option value="1"> Wilson Rental </option> 
<option value="2"> Church of Christ</option> 
</select>
</td>
<td>
<input type="radio" name="paid" value="0"> Yes <br />
<input type="radio" name="paid" value="1"> No <br />
</tr>
<tr>
<td colspan="4" align="right"> <input type="submit" name="search" value="Search">
</td>
</tr>
</table>

<br />
<br />
<p>
<?php
    if(!empty($message)) {
        echo "<h1 class=\"formtitle\"> Payroll Result </h1>";
        echo $message;
        }
    ?>
</p>
</form>
<?php include("includes/footer.php"); ?>
    <?php mysql_close($connection); ?>

Sorry for the loooong post!! I hope someone knows the solution for my problem!

Thanks! 🙂

  • 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-19T04:13:46+00:00Added an answer on June 19, 2026 at 4:13 am

    There’s a lot of code here to take in, but I think your $message builds <tr>s, but when you echo $message, you’re not inside a table element..?

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

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have been unable to fix a problem with Java Unicode and encoding. The
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I have a small JavaScript validation script that validates inputs based on Regex. I

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.