AgTalk Home
AgTalk Home
Search Forums | Classifieds (1) | Skins | Language
You are logged in as a guest. ( logon | register )

HTML Linking
View previous thread :: View next thread
   Forums List -> Computer TalkMessage format
 
torn
Posted 12/9/2014 14:33 (#4229533 - in reply to #4229402)
Subject: RE: HTML Linking


roaming
As long as PHP is installed on your server, you would change your page extension (on the page with the script) to *.php (i.e. "index.php"). That will tell the server to process the page through the PHP engine rather than as a plain HTML page.

Then you need to add the actual PHP script to the page in question. If you're not using one already, I would strongly recommend using an include for your navigation. That way you only have to change 1 file rather than many, if/when your navigation changes. So the script below would go in your include (if used) or on the calling PHP page if you decide not to use an include.

The script would be something like:

<?php
if (basename($_SERVER['PHP_SELF']) == "index.php") {
//display "Homepage" as plain text (no hyperlink);
}
else {
//display "Homepage" text linked to the index page;
}
?>

Edited by torn 12/9/2014 15:31
Top of the page Bottom of the page


Jump to forum :
Search this forum
Printer friendly version
E-mail a link to this thread

(Delete cookies)