Reply
Image display only on first page
Old 04-17-2007, 10:05 AM Image display only on first page
Junior Talker

Posts: 1
Is there a way in PHP to limit an image to only be displayed on the home page(index.php).
dannyd is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 04-17-2007, 10:39 AM Re: Image display only on first page
tripy's Avatar
Fetchez la vache!

Posts: 1,986
Name: Thierry
Location: In the void
Simple, put a variable in the session, or a cookie on the user's browser to indicate if this is the first view of the page or not.
__________________
Listen to the ducky: "This is awesome!!!"

tripy is offline
Reply With Quote
View Public Profile
 
Old 04-17-2007, 07:33 PM Re: Image display only on first page
Average Talker

Posts: 25
Um, well if you're using header/footer files and you don't want to make an exception for index.php, you could just add:
Code:
<?php
if ($_SERVER['REQUEST_URI'] == '/index.php') echo '<img src="index-image.jpg" />';
?>

Last edited by ryogo : 04-17-2007 at 07:34 PM.
ryogo is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Image display only on first page
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12873 seconds with 13 queries