How PHP Can Help Save You Time And Mistakes.

Written by Ben Rourke

Continued from page 1

Noticerepparttar first segment:


include 'template/header.php'; ?>

You must always includerepparttar 118027 opening tag: <?php andrepparttar 118028 ending tag: ?> In between them we have an instruction to 'include' a file called 'header.php' which is located in a folder on your web site called 'template'. Obviously these can be renamed to anything you like.

Now forrepparttar 118029 second segment:

<?php include 'template/footer.php'; ?>

Again, we have given an instruction to 'include' a file called 'footer.php' which is also located in a folder called 'template' on your web site, inrepparttar 118030 same directory or folder as your 'index.php' file.

To see these files individually go to: and

and viewrepparttar 118031 source code on those pages using your web browser.

Now you can add content to your web pages by inserting or copying and pasting existing code betweenrepparttar 118032 PHP segments of your 'index.php' file as shown above.

That is it! To change any information inrepparttar 118033 'header.php' for example, just open that file in an editor and make your changes. Then save and upload 'header.php' torepparttar 118034 'template' folder on your web site.

Go to 'index.php' and all your changes are magically included. You can seerepparttar 118035 benefits of this. If you had a site with 20 pages, all your changes happen on every page by just editing this one 'header.php' file.

Just 'include'repparttar 118036 header and footer files into every other page you make as inrepparttar 118037 'index.php' file, calling your second page for example 'products.php', then 'contact.php' etc. The only thing different between allrepparttar 118038 pages will berepparttar 118039 content you insert betweenrepparttar 118040 header and footer sections.


So, if you have put off learning PHP until now, I hope that this has encouraged you to make a start. There are countless other ways to use PHP and maybe one day you could even program your own safelist script using it.

Userepparttar 118041 source fromrepparttar 118042 examples and make changes torepparttar 118043 'header.php' and 'footer.php' files and see this in action for yourself.

Above all have fun!

------------------------------------------------------------ Ben Rourke. Download Your FREE POP3 Mailbox Cleaner. Works Directly From Your Desktop. ------------------------------------------------------------

Meta Tags

Written by Alan Stewart

Continued from page 1

Do not fall intorepparttar trap of constantly changing your page to try and get listed high on a search engine. Because what you do for one search engine, you will have to do something else for another one. Write your pages forrepparttar 105572 people that will be coming to your site. Utilizing this basic but sound practice, will keep your visitors coming back time and time again.

Now forrepparttar 105573 codes.

<meta name="Description" content=" "> <meta name="Keywords" content=" ">

Just put inbetweenrepparttar 105574 parenthesis a good description of your site and inrepparttar 105575 keyword line, your keywords that you want to be indexed under.

Your keywords need to be utilized in your html document effectively. If your content is good, and you have utilized your keywords effectively, then your job is done. Just sit back, and wait, forrepparttar 105576 search engines to reward you.

Alan operates Web Tools Resource a help site for learning html, and other aspects in creating a web site. Lots of helpful tutorials and ideas.

    <Back to Page 1 © 2005
Terms of Use