Includes Problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
a94060
Forum Regular
Posts: 543
Joined: Fri Feb 10, 2006 4:53 pm

Includes Problem

Post by a94060 »

Hello Everyone,


I am trying to include a footer at the bottom of a page. It just contains links to other portions of the site. The page it is being included on is a dynamic page, it recieves actions using GET. The problem is however, when i go to the page using a get (page.php?action=whatever), the included file is included before any of the actions, when i want it to be at the bottom. Any help will be appreciated.

Code: Select all

 
<?php
session_start();
 
/*This page containts all of the administrative operations.
member_add,member_view,member_delete,
event_add,event_modify,event_view,event_delete
statistics*/
include "../db_connect.php";
if(isset($_SESSION['logged_in'])) {
$action = $_GET['action'];
//all my actions which happen go here.
    include "footer.html";
    } //closes the session check
else {
include "not_logged.php";
}
 
?>
 
towerspl
Forum Newbie
Posts: 20
Joined: Mon Aug 03, 2009 7:37 am

Re: Includes Problem

Post by towerspl »

it makes no sense why it would do that maybe you have unclosed divs or something along those lines
User avatar
a94060
Forum Regular
Posts: 543
Joined: Fri Feb 10, 2006 4:53 pm

Re: Includes Problem

Post by a94060 »

i was thinking that iwas ridiulous, but i am pretty sure that i dont have any unclosed divs because i dont use divs :D


EDIT-I lied, i checked for all div tages,found a couple, closed them and tried again. The included stuff still comes on the top
User avatar
a94060
Forum Regular
Posts: 543
Joined: Fri Feb 10, 2006 4:53 pm

Re: Includes Problem

Post by a94060 »

Nevermind, i got it working. It turns out that i had not closed the table tag. Thanks for your help
Post Reply