Notice: Undefined variable: s_offline in /homepages/6/d168803796/htdocs/officetrio.com/o3/o3start.php on line 314
Free PHP Navigation Script OfficeTrio: The Integrated ECommerce Solution OfficeTrio: The Integrated ECommerce Solution OfficeTrio: Features OfficeTrio: User Manual OfficeTrio: Testimonials OfficeTrio: The Demo is Offline! OfficeTrio: Order O3 Now

PHP Navigation Script Explanation

To download any script, please go to the Free Scripts page.

Line By Line: nav.php



This is a very simple script, it's mainly just printing out HTML commands. in fact, if we'd just wanted a list of links in a single file we could have made this a HTML file and not bothered with PHP!

The reason we use PHP here is because this script recognises which page the browser is currently on, and greys out the links to that page...

  • Print out the table header.
    Note - the default font colour is grey. So all we need to do to 'grey out' a link is to make sure it's not a hyperlink (in which case it'll be blue and underlined - or whatever the defaults are set to).

    <? echo '<table border="0" ..... color="#777777">';

  • If $PHP_SELF contains the string 'toc.php' then this is the contents page so just print the page description (followed by four spaces).

    if (strstr($PHP_SELF,"toc.php")) { echo 'Contents &nbsp;&nbsp;&nbsp;&nbsp;'; }

  • If $PHP_SELF doesn't contain that string - this isn't the contents page, so print the page description as a link.

    else { echo '<a href="toc.php">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp;'; }

  • Repeat this procedure for all the pages in the website...

  • Print out the HTML to close the table. End the PHP code.

    echo '<tr><td bgcolor .... /table>'; ?>



Tutorials

Contents

Free EBooks
Free Scripts

Introduction
What Can I Do With A Website?
Internet History
Introduction
Preparation
Website Builders

Webmaster's Tools
Tools Intro
HTML Editor
PHP IDEs
Graphics Resources
Telnet and FTP
Miscellaneous Tools

Web Design
Web Design
Domains
Keywords/Description
Logo/Graphics

Creating Web Pages
Setup
HTML
HTML Tips And Tricks
Home Page
Navigation
Other Pages

Webhosting and Unix
Webhosting
Telnet/Unix
More Unix
Website Upload
Analyse And Verify

Programming
Programming 1
Programming 2

PHP
PHP
PHP Scripts
PHP Hit Counter Script
PHP Download Tracking Script
PHP Navigation Script
PHP Affiliates Tracking Script
PHP Users Management
PHP Site Search Script

Perl
Perl
Perl Hit Counter Script
Perl Order Processing Script

Databases
Databases
SQL
Database Setup

ECommerce
ECommerce

Automation
Automating Order Processing
PayPal Automation
Email Automation
Installing Scripts

Security
Basic Security

Affiliates
Affiliates Programs

Managing Your Website
Website Management
Promotion/Advertising
Search Engines
Search Engine Optimisation



Powered By OfficeTrio