Hi all of you,
Are doing my first website in php and have someproblems.
My structure in the root folder is following:
index.php
header.php
work\
family\
music\
film\
were work, family, music and film are FOLDERS.
In my header.php a I have a image. The things is that I want to change the image depending of which file I'm showing.
For example:
- If the file is from the work folder I want the picture to show
my office,
- If the file is from the family folder I want the picture to show
my family....
............ and so on.....
So I have so have some code like this:
php:
if (something)
{
print("<img src=\"work.gif\" width=\"15\" height=\"15\">");
}
elseif (something)
{
print("<img src=\"music.gif\" width=\"15\" height=\"15\">");
}
elseif (something)
{
print("<img src=\"film.gif\" width=\"15\" height=\"15\">");
}
The question is: WHAT should I put in "something" ???
It has to recognize in which folder the file is.....how to do that?
/TheBeginner