Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Bidding Directory   1,000 Directory Submissions   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 02-10-2005, 02:39 PM   #1 (permalink)
DOS
Senior Member
 
DOS's Avatar
 
Join Date: 08-03-04
Posts: 1,077
iTrader: 0 / 0%
Latest Blog:
None

DOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to behold
PHP Include

I have tested php include and can now see the included file (a template).
How do I add content to this, because in the code, all you see is the include, and no place to add text, links etc.
DOS is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 02-10-2005, 02:43 PM   #2 (permalink)
No Longer Here
 
Join Date: 09-27-03
Location: State College, PA
Posts: 9,354
iTrader: 0 / 0%
Latest Blog:
None

Jazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebody
You would put the content in the included file.
Jazzee is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-10-2005, 09:02 PM   #3 (permalink)
Inactive
 
insitedev's Avatar
 
Join Date: 12-14-04
Posts: 108
iTrader: 0 / 0%
Latest Blog:
None

insitedev is liked by somebodyinsitedev is liked by somebodyinsitedev is liked by somebodyinsitedev is liked by somebody
Personally, I find it easiest to separate the template into two parts - header and footer.

You can do this in a number of different ways. The most common that I've seen has been to have a file for the top part of your template, and a file for the bottom part. Include those around the content you would like to see inside of the template.

For example, this would be in the header file:

Code:
<html> <head> <title>Page Title</title> <body> <h2>Page header</h2> <table border="1" cellspacing="0" cellpadding="0" width="100%"> <tr><td>
This would be in the footer file:

Code:
</td></tr> </table> </body> </html>
Then your main PHP code would be as follows:

Code:
<?php include ("header.php"); ?> Content that you want inside of the table <?php include ("footer.php"); ?>
This would then output:

Code:
<html> <head> <title>Page Title</title> </head> <body> <h2>Page Header</h2> <table border="1" cellspacing="0" cellpadding="0" width="100%"> <tr><td>Content that you would like inside the table</td></tr> </table> </body> </html>
Hopefully this helps you out.
insitedev is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-12-2005, 12:40 AM   #4 (permalink)
Inactive
 
Spiral's Avatar
 
Join Date: 07-06-04
Location: Detroit, MI
Posts: 594
iTrader: 0 / 0%
Latest Blog:
None

Spiral is liked by somebodySpiral is liked by somebodySpiral is liked by somebodySpiral is liked by somebody
Send a message via AIM to Spiral Send a message via MSN to Spiral
insite hit the nail dead on the head. This is what I like to do as well. It works perfectly in most cases.
Spiral is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

vB 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
SSI Include vs. PHP Include devilzfan300 Coding Forum 4 12-18-2006 01:14 PM
Include SN3 Coding Forum 11 06-12-2005 11:46 AM
php vs. ssi include downtroden Coding Forum 3 11-29-2004 10:01 AM
What Else Should I Include seonewbee Web Design Lobby 0 07-03-2004 01:15 PM
div include? Pretend Coding Forum 15 10-21-2003 02:35 PM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 04:37 AM.
© Copyright 2008 V7 Inc