Help need with php include!!

This is a discussion on "Help need with php include!!" within the PHP Forum section. This forum, and the thread "Help need with php include!! are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Dec 28th, 2005, 16:58
Junior Member
Join Date: Dec 2005
Location: Scotland
Age: 19
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to allstar Send a message via MSN to allstar
Wink Help need with php include!!

Ok i have a template of my website that i have created with tables and i wanted it to load on every page as i want to make it easy for me when i want to make a change on my site or if i want to add i a link in my navigation bar i don't want to go through all 15+ pages. I have used the include before when i used <div> tag but now i am not sure i would need to use a <div> tag or how it would work please help me

does that make sence???

thanks
steven
Reply With Quote

  #2 (permalink)  
Old Dec 28th, 2005, 23:16
Highly Reputable Member
Join Date: May 2005
Location: U.K
Age: 21
Posts: 739
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbramz
Re: Help need with php include!!

Quote:
Originally Posted by allstar
does that make sence???
no....lol
Reply With Quote
  #3 (permalink)  
Old Dec 28th, 2005, 23:38
herkalees's Avatar
Highly Reputable Member
Join Date: Jul 2005
Location: Massachusetts, USA
Age: 87
Posts: 576
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to herkalees Send a message via MSN to herkalees Send a message via Yahoo to herkalees
Re: Help need with php include!!

It's super easy, just toss your code-to-be-included into another file, and on each of the 15+ pages, in the exact location you want the code-to-be-included to show up, you put this:

<?php require("file-name.html"); ?>
Reply With Quote
  #4 (permalink)  
Old Dec 29th, 2005, 03:12
Highly Reputable Member
Join Date: May 2005
Location: U.K
Age: 21
Posts: 739
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbramz
Re: Help need with php include!!

good old herk....
Reply With Quote
  #5 (permalink)  
Old Dec 29th, 2005, 08:05
Junior Member
Join Date: Dec 2005
Location: Scotland
Age: 19
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to allstar Send a message via MSN to allstar
Wink Re: Help need with php include!!

Quote:
Originally Posted by herkalees
It's super easy, just toss your code-to-be-included into another file, and on each of the 15+ pages, in the exact location you want the code-to-be-included to show up, you put this:

<?php require("file-name.html"); ?>
i know how to do that but what i mean is that i have created my site using a table. Follow me so far??

Well i want something that will make my life easier for updating links or anything that is located in my navigation bar and when i decide to change that layoutof the site Still understand??

Well i want to put all the content on a black document then so when a user click the link the sever knows to open the document that has the all the layout on and it opens the content which is needed to be displayed as well

i hope i explained that better *crosses fingers*
Reply With Quote
  #6 (permalink)  
Old Dec 29th, 2005, 08:09
Junior Member
Join Date: Dec 2005
Location: Scotland
Age: 19
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to allstar Send a message via MSN to allstar
Re: Help need with php include!!

here is my codes
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>TOXIC-TIME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;INTOXICATION OF LIFE</title>
<META NAME="description" content="Personal blog/graphics website produced by me ,Steven, a 16 year old from scotland.">
<META NAME="keywords" content="toxic-time.net, toxic-time, toxic, time, times, .net, domain, website, web site, site, personal, blog, graphics, free graphics, steven, steve, stephen, s, scotland, uk ,Scots,  jasc, jasc paint shop pro, jasc paint shop pro 7, jasc paint shop pro 8, psp7, psp 7, psp 8, psp8, psp9, psp 9, paint shop pro 9, jasc animation shop 3, animation shop 3, animation, animate, paint, artist, web master, webmaster, web, web designer, webdesigner, designer, design, original designs, original, portfolio, folio, aspiring web designer, graphic designer, tut, tutorial, tutorials, psp 7 tutorials, ps 7 tutorials, photoshop tutorials, paint shop pro tutorials, animation shop tutorials, animation shop 3 tutorial, php tutorial, php, php includes, php includes tutorial, blending tutorial, HTML tutorials, HTML, HTML codes, html code, code, codes, javascript codes, layout, layouts, custom designs, custom design, custom, custom web design, free lance web designer, cheap web design, quality web design, affiliate, affiliates, link, links, advertise, cheap advertising for web sites, cheap advertising, website help">
<META name="Language" content="English">
<META name="resource-type" content="document">
<META name="distribution" content="Global">
<META name="copyright" content="toxic-time.net">
<META name="robots" content="Index,Follow">
<META name="rating" content="General">
<META name="revisit-after" content="1 day">
<STYLE type=text/css>
BODY, P, TD, TR, DIV, TABLE, B, I
{ font-family : verdana, tahoma, sans-serif;  FONT-SIZE: 10px; color:white; Line-height:12px; letter-spacing:0pt; background-color: black
}
a:link{text-decoration:none;color:white;TEXT-ALIGN: justify;
}
a:visited{text-decoration:none;color:white;TEXT-ALIGN: justify;
}
a:active{text-decoration:none;color:white;TEXT-ALIGN: justify;
}
a:hover{text-decoration:none;color:white;TEXT-ALIGN: justify;
}
input , textarea , select {
background : #8B3626;
font-size : 10px; 
font-weight : bold;
font-family : verdana, tahoma, sans-serif; 
color : white; 
border : 1px solid white; 
} 
.x {
color : white; 
font-weight : bold; 
font-size : 15px; 
text-align : left; 
.nav {
 color: #ffffff;
 width:116px;
height:28px
padding-left: 5px;
 font-size: 10px;
 letter-spacing: 1px;
 text-align: center;
 border-top-width: 1px;
 border-top-style: solid;
 border-top-color: #ffffff;
}
.outline {
border: 1px solid #ffffff; 
}
</style>
</head>
<body>
<table  width="785" height="347" border="0" align="center">
  <tr>
    <td class="outline" height="304" colspan="3" valign="top"><img src="Sadlayout/pics/compreseed3.jpg" alt="Toxic Time Header" width="850" height="300" border="1 white"/></td>
  </tr>
  <tr>
    <td width="195" align="center"><table width="116" height="28" border="0">
      <tr>
        <td width="116" height="28" class="nav">Navigation</td>
      </tr>
      <tr>
        <td width="116" height="28" class="nav">//<a href="webmaster.php">Webmaster</a><br>
 //<a href="terms_con.php">You</a><br>
           //<a href="qna.php">Questions</a><br>
        //<a href="tag_me.php">Tag me</a><br>
        //<a href="advertise.php">Advertise</a><br>
        //<a href="portfolio.php">Portfolio</a>//<a href="credits.php">Credits</a><br>
        //<a href="index.php">Clear</a></td>
      </tr>
    </table>
      <p><table width="116" height="28" border="0">
      <tr>
        <td width="116" height="28" class="nav">Affiliates</td>
      </tr>
      <tr>
        <td width="116" height="28" valign="top" class="nav"><p><img src="Affiliates/buttonxx.gif" alt="Darichanboi.com affilite" width="88" height="31" /></p>
          <p>Inerested??</p></td>
      </tr>
    </table>
      <p>
      <table width="116" height="28" border="0">
      <tr>
        <td width="116" height="28" class="nav">Link Me </td>
      </tr>
      <tr>
        <td width="116" height="28" valign="top" class="nav"><p><img src="Link me/link_1.gif" alt="Darichanboi.com affilite" width="83" height="31" class="outline" /></p>
          <p>Please upload image to your own host please </p></td>
      </tr>
    </table></p>
    </p></td>
    <td width="651" colspan="2" valign="top">&nbsp;</td>
  </tr>
</table>
</body>
</html>
Reply With Quote
  #7 (permalink)  
Old Dec 29th, 2005, 13:58
herkalees's Avatar
Highly Reputable Member
Join Date: Jul 2005
Location: Massachusetts, USA
Age: 87
Posts: 576
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to herkalees Send a message via MSN to herkalees Send a message via Yahoo to herkalees
Re: Help need with php include!!

You could just put this into a separate file:
Code: Select all
<td width="116" height="28" class="nav">//<a href="webmaster.php">Webmaster</a><br>
//<a href="terms_con.php">You</a><br>
//<a href="qna.php">Questions</a><br>
//<a href="tag_me.php">Tag me</a><br>
//<a href="advertise.php">Advertise</a><br>
//<a href="portfolio.php">Portfolio</a>
//<a href="credits.php">Credits</a><br>
//<a href="index.php">Clear</a></td>
And in between the <tr></tr> tags, you put the little line of PHP code I mentioned in my above post.
Reply With Quote
  #8 (permalink)  
Old Dec 29th, 2005, 15:09
Junior Member
Join Date: Dec 2005
Location: Scotland
Age: 19
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to allstar Send a message via MSN to allstar
Re: Help need with php include!!

Quote:
Originally Posted by herkalees
You could just put this into a separate file:
Code: Select all
<td width="116" height="28" class="nav">//<a href="webmaster.php">Webmaster</a><br>
//<a href="terms_con.php">You</a><br>
//<a href="qna.php">Questions</a><br>
//<a href="tag_me.php">Tag me</a><br>
//<a href="advertise.php">Advertise</a><br>
//<a href="portfolio.php">Portfolio</a>
//<a href="credits.php">Credits</a><br>
//<a href="index.php">Clear</a></td>
And in between the <tr></tr> tags, you put the little line of PHP code I mentioned in my above post.
ok i didn't think of it like that stupid me!!!
Reply With Quote
Reply

Tags
help, php, include

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
@include() conundrum CloudedVision PHP Forum 3 Feb 15th, 2008 03:38
include problem alexgeek PHP Forum 11 Aug 8th, 2007 14:14
Can I use #include within an If Then statement? Donny Bahama Classic ASP 5 Jul 30th, 2006 18:29
js include timmytots JavaScript Forum 5 Jul 8th, 2006 12:43
JS include timmytots JavaScript Forum 5 Jun 16th, 2006 01:49


All times are GMT. The time now is 07:27.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43