Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

css file


ghost's Avatar
0 0

im working in a css file and im having trouble with a script being used in multiple pages which i dont want it to be in. i know i need to define a if else statement but im unsure how to do it. this is what i need.

If (((the page is equal to index.php))) then include welcome.php else die

i need help with what goes into the parenthesis. heres a snippit of my code.

<?php include("welcome.php"); ?>

thats the code i want to include IF the page is index.php.


ghost's Avatar
0 0

please explain your question in more detail…if you just want something on the index page and nothing else….just stick it on the index page lol….but if thats not what you mean pm me or soemthing


ghost's Avatar
0 0

well i could put it in the index i guess but im running on a cms and its hard to find where things fit with all the code. so instead i found the spot in the css and i just need a simple if/then statement to make it only show on insex. and that is what im asking. how do i do the if/then statement.


ghost's Avatar
0 0

ok problem fixed after hours of going through code :ninja:


Mr_Cheese's Avatar
0 1

if($_SERVER['PHP_SELF'] == "/index.php"){ include "welcome.php"; }