PHP can be very useful in your webiste design, I use PHP for my websites difficult functions such as forums, blogs, chat, user forms, and shopping cart interface.
But did you know you can use simple PHP for your website navigation systems?
The use of PHP for your websites header, left side navigation, and bottom of page information can be a great asset. Now I know what you are thinking, PHP can be complicated and intimidating to many of you, but first let me explain. Using simple PHP include commands is a method any webmaster at any expertise level from novice to expert can implement with ease.
Most find editing PHP a frightening endeavor, but never fear, I will show you how.
A lot of us still use tables when designing our web pages instead of CCS, below is a veiw of the basic setup I will be discussing in this article:
Go < ? phpinfo(); ?>
Save the file as phpinfo.php and upload it to your server where you store your HTML files.
To run the script, simply point your browser to the script address. It should look something like this:
http://www.yourdomain.com/phpinfo.php
If PHP is installed on your server, you will be presented with a page of information about the PHP installed on your server.
If PHP isn't installed, you will be prompted to download the file. In this case, you'll need to contact your web host and ask them to install it, as it is free to download and install.
You can learn more about PHP and download it
We will get into how to use the above command a little later in this article . Now on to the steps:
Step 1. Build the the following pages in your favorite HTML editor:
A. header.html
B. left.html
C. bottom.html
D. right.html (optional)
Or you can name these files what ever you like, but I will be referencing them as the above for this article. Once you have these pages built to your liking, we now start implementing with PHP. First build a new Index.html page, you can name it TEST or something until you get it the way you want it. Set it up with tables to look like the page below:
Go here to see Image.
Step 5. Editing the new PHP navigation pages is easy, all you need to do is edit the HTML file you built in you favorite HTML editor. When your are done just copy the pages HTML and then paste it into the corresponding PHP file. To do this open the PHP file with a text editor and replace the HTML with in it with the edited version of HTML and save it as .php again. Now your PHP file is updated to match your edited HTML file.
In conclusion: Now when ever you update your website header and navigation pages the results will be reflected on every page on your website that you have setup in this fashion. And as a added bonus all the information and links included in your navigation PHP can be seen and indexed by all the search engine robots for higher rankings.
Add to document.write("Del.icio.us") | Yahoo! My Web
Technorati:
Craig Freshwater is the Webmaster/CEO for http://www.newcybertech.com/Blog and the Newcybertech Forum
Found an error or have a suggestion? Let us know and we'll review it.
Suggest a Correction
Using PHP for Website Navigation, Explained
0 views
Comments (0)
Please sign in to leave a comment.





No comments yet. Be the first to comment!