Jump to content

Including files not working


dean7

Recommended Posts

Hi all, I've got two scripts for my website which I would like to display on one page, but what i've got is, The Menu on one php file, and the content on a different php file. Ive tryed the include, include_once, require, require_once, but for which ever one I use it just displace a blank page with nothing on it.

 

Both of the files work on there on, but when I include the menu to the content page it just dont show anything. This is what ive tryed:

 

<?php
include ("crewtop.php");
if ($crewstuff->boss == $username || $crewstuff->coowner == $username || $crewstuff->underboss == $username){
?>
<table width='80%' align='center' class='table' cellpadding='0' cellspacing='0' border='1'>
<tr>
<td class='header' colspan='4' align='center'>Current Crew Members</td>
</tr>
<tr>
<td class='omg' align='center' width='25%'>Username</td><td class='omg' align='center' width='25%'>Rep</td><td class='omg' align='center' width='25%'>Rank</td><td class='omg' width='25%' align='center'>Kick</td>
</tr>

 

This seems a easy thing to sort, just I carnt see why it isnt displaying the other file.. Anyone see why?

 

Thanks.

 

(if more code is needed i'll display more)

Link to comment
Share on other sites

I've think I've found what could be the problem, just not sure what todo about it, when I show the Errors, I get an Error saying:

 

Fatal error: Cannot redeclare logincheck() (previously declared in /home/www/*******-*****.com/includes/functions.php:67) in /home/www/*******-*****.com/includes/functions.php on line 75

 

But all that is, is my logincheck to make sure the user is logged in..

 

function logincheck(){
if (empty($_SESSION['username'])){
echo "
<SCRIPT LANGUAGE='JavaScript'>
window.location='index.php';

</script>
";
exit();
}} // Line 75

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.