Include

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Supplement
Forum Commoner
Posts: 45
Joined: Thu Aug 18, 2011 8:52 pm
Location: Oceanside, CA

Include

Post by Supplement »

if($str1[REF] == 'index.php')
{
echo '<div class="solid_divider"><img src="images/spacer.gif" width="1" height="1" alt="spacer"></div><br>
<p><font size="2px">All my content will go here.</p>
</font><br>'; }

I have this if statement / string and I want it to be and Include on the home page and the homepage only. The problem is when i call it out by index.php it appears on other pages when the dynamic URLS have www.mysite.com/index.php?category_name=this

Thanks in advance for any help.
xtiano77
Forum Commoner
Posts: 72
Joined: Tue Sep 22, 2009 10:53 am
Location: Texas

Re: Include

Post by xtiano77 »

Without seen the whole page code, I would suggest trying to match the complete URL instead of the file name. You can clean up the URL with the str_replace( ) method removing any characters starting with "?" onwards, then check it against the specific URL for the login page. Hope this helps.
User avatar
Supplement
Forum Commoner
Posts: 45
Joined: Thu Aug 18, 2011 8:52 pm
Location: Oceanside, CA

Re: Include

Post by Supplement »

Thanks, I'll give that a try.
Post Reply