include() at the very bottom
Posted: Fri Feb 27, 2004 9:32 pm
How would I go about getting a page with include to appear at the very bottom of the page it is include() in? Tables, or is there an easier way?
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
<HTML>
<HEAD>
<TITLE> index.php </TITLE>
</HEAD>
<BODY>
This is our main file.
<BR /><BR />
<?php
///////////////////////////////////////////////////////
// INCLUDE FOOTER FILE
///////////////////////////////////////////////////////
include_once("/path/to_my/footer.php");
//
?>Code: Select all
Copyright &copy; Your Name. 2000-<?= date('Y');?> All Rights Reserved.
</BODY>
</HTML>Code: Select all
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
#
#--------- Form deleted for space
#
if(!empty($_POST['name']) && !empty($_POST['email']) && !empty($_POST['comments'])){
$name=$_POST['name'];
$address=$_POST['email'];
$comments=$_POST['comments'];
echo ("<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="5%"><div align="center">
<td width="50%" bgcolor='#EFEFEF'>
<i>This is the information you submitted:</i><br><br>
Name: $name<br>
Email: <a href='mailto:$address'>$address</a><br>
Comments: $comments<br><br>
<div align='center'><font size="1">If you would like to see the entire guestbook, click <a href='guestbook.php'>here</a>.</div>
</td>
<td width="25%">
</td>
</div>
</td>
</tr>
</table>");
}else{
echo "<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td>
<div align="center">
Fill it out man.
</div>
</td>
</tr>
</table>
";
}
include("footer.php");
#
#-- Getting this at the absolute bottom of the page, regardless of browser size, is what I am after. Right now it is at the bottom of the form.
#
?>
</body>
</html>Code: Select all
<?php
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
#
#--------- Form deleted for space
#
if(!empty($_POST['name']) && !empty($_POST['email']) && !empty($_POST['comments'])){
$name=$_POST['name'];
$address=$_POST['email'];
$comments=$_POST['comments'];
echo ("<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="5%"><div align="center">
<td width="50%" bgcolor='#EFEFEF'>
<i>This is the information you submitted:</i><br><br>
Name: $name<br>
Email: <a href='mailto:$address'>$address</a><br>
Comments: $comments<br><br>
<div align='center'><font size="1">If you would like to see the entire guestbook, click <a href='guestbook.php'>here</a>.</div>
</td>
<td width="25%">
</td>
</div>
</td>
</tr>
</table>");
}else{
echo "<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td>
<div align="center">
Fill it out man.
</div>
</td>
</tr>
</table>
";
}
<table height=100%>
<tr><td></td></tr>
</table>
include("footer.php");
#
#-- Getting this at the absolute bottom of the page, regardless of browser size, is what I am after. Right now it is at the bottom of the form.
#
?>
This should do the trick
</body>
</html>
?>