KnewBees Newbie Webmaster Forum  

Go Back   KnewBees Newbie Webmaster Forum > Building Sites > HTML Tips

Reply
 
Thread Tools Display Modes
  #1  
Old 06-23-2010, 04:11 AM
heshan heshan is offline
Baby BumbleBee
 
Join Date: Jun 2010
Posts: 1
Rep Power: 0
heshan is on a distinguished road
Default html external sheets

I'm new to this forum, a complete newbie, but I was wondering how I can tell my html page to open another html page and read what is in the new page for that specific section.

For example: I have google ads on the right side of my website, where I would put the ad, is there a way to link it to another html script without actually putting it in my html page?

Kinda like a CSS sheet but the other way around. I don't want to have to go through every page to change the ad code, I just want to change an external sheet where the ad code is.

I also want to do this for the body of my website where the content is. Can I link a external sheet that would input content into the body of the website?
__________________
turbo
Reply With Quote
  #2  
Old 07-05-2010, 11:26 AM
Lee_the_Bee's Avatar
Lee_the_Bee Lee_the_Bee is offline
Administrator
 
Join Date: Dec 2005
Posts: 321
Rep Power: 15
Lee_the_Bee is on a distinguished road
Default

Sounds like you would benefit from using php includes.
Assuming you have a half decent host that runs php.

Create pages for ads, navigation, header, footer etc. with extension .php

ad1.php
ad2.php
navigation.php
header.php
footer.php

Then pop some code like this where you want it

Code:
<?php include("ad1.php"); ?>
You may need to fuss with your settings to allow php to function. Sometimes it's easiest to just make .php the extension for all pages. Otherwise you need to fuss with the .htaccess file to add handlers adding a line like this
Code:
AddType application/x-httpd-php .html
Reply With Quote
Reply

Bookmarks

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Html Tips for Newbies solutionc HTML Tips 5 08-10-2010 01:12 AM
Is there is a special or secret way to use HTML while designing a webpage? zerugaze HTML Tips 3 07-30-2010 12:58 PM
html vs. php Daniel777 PHP 5 02-04-2010 03:50 AM
When did you learn HTML? designer01 HTML Tips 18 07-12-2009 03:08 PM
Still haven't studied the HTML books... Lee_the_Bee HTML Tips 1 02-03-2006 03:53 AM


All times are GMT -5. The time now is 09:35 PM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.