Detecting the URL and choosing a statement.
Posted: Sun Jun 08, 2008 2:51 pm
Hi comm,
First I´m a bit new in PHP but I understand it well.
I´m going to tell what is my objetive:
I have a site that I want to show in the index "a.jpg" and in the other pages "b.jpg"
For example I want something like this:
The problem is that I need how to get the URL into a variable.
Thanks for advance
Greetings
Master Phantom
First I´m a bit new in PHP but I understand it well.
I´m going to tell what is my objetive:
I have a site that I want to show in the index "a.jpg" and in the other pages "b.jpg"
For example I want something like this:
Code: Select all
<?php
if (myURL == "http://mydomain.com/index.php"){
echo ("<div align='center'><img src='a.jpg'>");
} else {
echo ("<div align='center'><img src='b.jpg'>");
?> Thanks for advance
Greetings
Master Phantom