Adding header to a new php script
mdb Offline
Junior Member
**
Posts: 27
Joined: May 2012
Post: #1
Adding header to a new php script
Hey guys,
I'm not really a coder so this is really troubling me at the moment. I was hoping someone here would have a simple solution on how to achieve what i'm trying to do.

I have this new php script that I wanted to add to my forums, all the php and html is inside this one php file. Now I also want to add my mybb header and footer to the page as well.

I added this at the top of the php script:

PHP Code:
define('IN_MYBB', 1); 
define('THIS_SCRIPT', 'bans.php');

require "./global.php";


Then down the script I added:

PHP Code:
echo "<html>\n<head>'{$headerinclude}'\n";


However it does not display my header at all. I'm not even sure if this is the way to go about it but it was just a complete guess on my part. Do you guys know a simple way I can get the header in there?

Cheers!

07-28-2012 06:35 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
Adding header to a new php script - mdb - 07-28-2012 06:35 AM

 Standard Tools
Forum Jump: