View Single Post
  #77 (permalink)  
Old 07-19-2008, 05:56 PM
chili5's Avatar   
chili5 chili5 is offline
Code Warrior
 
Join Date: Mar 2008
Age: 16
Posts: 3,939
Last Blog:
DWITE 2
Credits: 0
Rep Power: 35
chili5 is a name known to allchili5 is a name known to allchili5 is a name known to allchili5 is a name known to allchili5 is a name known to allchili5 is a name known to all
Default Re: Including header file using HTML

It's a very useful function I've been using it a lot to do a lot of things. Like creating navigation and displaying links only on certain pages. Like it doesn't make sense on index.php to have the logo linking to index.php so:

PHP Code:
<?php
if (eregi("index.php",$_SERVER['PHP_SELF'])) {
echo 
"<img src=\"logo.jpg\" alt=\"logo\" />";
} else {
echo 
"<a href=\"index.php\"><img src=\"logo.jpg\" alt=\"logo\" border=\"0\" /></a>";
}
?>
Of course it can be used to keep people off of included pages
__________________
I've found time can heal most anything
And you just might find who you're supposed to be
I didn't know who I was supposed to be at fifteen.
~ Taylor Swift
Reply With Quote