Hi All,
Here is my Index code. How can I make footer be at the bottom of other div. In css I floated to left the leftbar and to right the main contents. The header is fine but footer comes just below main content instead of being at bottom of all divs. Please help me get it down

html>
	<head>
		<title>Test Page - Elijah Ministries</title>
		<link rel="stylesheet" type="text/css" href="/projects/elijah/elijah.css" />		
	</head>
	
	<body>	
	<!--carries the whole Website -->
		<div id="main">
		
			<!--Header -->
			<div id="header">
				<?php
				$paths = getcwd();
				include("$paths/include/inc.header.php");
				?>
			</div>
			
			<!--Navigation bar -->
			<div id="nav">
				<?php
				//$paths = getcwd();
				//include("$paths/include/inc.header.php");
				?>
			</div>
			
			<!--Left bar Links -->
			<div id="leftbar">
				<?php
					include("$paths/include/inc.nav_links.php");
					print ("<br />");
					include("$paths/include/inc.mailing_list.php");
					print ("<br />");
					include("$paths/include/inc.elijah.php");
				?>
			</div>
			
			<!--right bar main contents -->
			<div id="mainarea">
			Right bar
			</div>
			
		<!--Footer -->
		<div id="footer">
			<?php
				include("$paths/include/inc.footer.php");
				?>
			</div>
		
		
		</div>
	
	
	</body>	
<html>

you should raise the last </div> before <div id="footer"></div>.
such as below:

<html>
      <head>
      <title>Test Page - Elijah Ministries</title>
      <link rel="stylesheet" type="text/css" href="/projects/elijah/elijah.css" />
      </head>
      <body>
      <!--carries the whole Website -->
      <div id="main">
      <!--Header -->
      <div id="header">
      <?php
      $paths = getcwd();
      include("$paths/include/inc.header.php");
      ?>
      </div>
      <!--Navigation bar -->
      <div id="nav">
      <?php
      //$paths = getcwd();
      //include("$paths/include/inc.header.php");
      ?>
      </div>
      <!--Left bar Links -->
      <div id="leftbar">
      <?php
      include("$paths/include/inc.nav_links.php");
      print ("<br />");
      include("$paths/include/inc.mailing_list.php");
      print ("<br />");
      include("$paths/include/inc.elijah.php");
      ?>
      </div>
      <!--right bar main contents -->
      <div id="mainarea">
      Right bar
      </div>
       </div>
      <!--Footer -->
      <div id="footer">
      <?php
      include("$paths/include/inc.footer.php");
      ?>
      </div>
      </body>
      <html>

and another issue: include("$path/...") ===> you are giving dynamically path to your pages, this is not secure. don't do that.

<div id="footer" style='bottom: 0;'>

and another issue: include("$path/...") ===> you are giving dynamically path to your pages, this is not secure. don't do that.

Could you please explain why ?

If I can type a url
or cheat any predefiend (fiend=evil sneaky -on purpose not a spelling error) variable
w ww.yoursite.com?path=malwaresite.com/malicious/nasty
and point your pages to something malicious if any path is accessible to the outside world
it may not be very likely -

Murphy II : If anything CAN'T go wrong, it will at the worst possible time.
O'Toole : Murphy is an optimist

If you fix it in design, and lock down the code,
there will never be anyone even look for an attack vector, and you will feel the design effort totally wasted
If you don't, the single tiny obscure security flaw that no-one will notice,
will be hit 10 times in the first 5 minutes

The same can usually be done in php processing and no part of the path be visible to the outside world

<?php
//path_test.php
$path = getcwd();
include($path."/get_file_contents.php");
?>
<?php
//this is get_file_contents.php
$data = htmlentities(file_get_contents("http://google.com"));
print $data;
?>

If you run the script path_test.php by typing the url, http://localhost/path_test.php?path=malwaresite.com/sneaky/malicious/nasty , it still wouldn't take the path specified in the url because, I am no where requesting ($_GET or $_REQUEST) the path.
I agree, If I didn't have this line

$path = getcwd();

and If I had enabled register.globals in my php.ini, then it would be a problem!

I have decided to use table until I get solution, so anybody can add anything to the thread

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.