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
Sandrine
Forum Newbie
Posts: 10 Joined: Wed Nov 16, 2005 6:14 am
Post
by Sandrine » Wed Nov 16, 2005 9:12 am
This is it:
Code: Select all
<?php
$urlvars = (isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : "none");
if($urlvars == "none")
{
include ("http://www.yayasan.org/templates/tdwfreedom/flash.php");
} else {
echo '<img src="'.$mosConfig_live_site.'/templates/tdwfreedom/images/mainpiclogo.jpg" border="0" alt="Photo by Andrea Simonato - downloaded from www.sxc.hu">';
}
?>
Burrito
Spockulator
Posts: 4715 Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah
Post
by Burrito » Wed Nov 16, 2005 9:13 am
echo $urlvars to see what it shows you should.
Sandrine
Forum Newbie
Posts: 10 Joined: Wed Nov 16, 2005 6:14 am
Post
by Sandrine » Wed Nov 16, 2005 9:17 am
No, it does ot have any sense.
Someone, any idea ?
Burrito
Spockulator
Posts: 4715 Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah
Post
by Burrito » Wed Nov 16, 2005 9:25 am
Code: Select all
<?php
$urlvars = (isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : "none");
echo $urlvars;
?>
what does that show?
Sandrine
Forum Newbie
Posts: 10 Joined: Wed Nov 16, 2005 6:14 am
Post
by Sandrine » Thu Nov 17, 2005 4:17 pm
Here is the code that works:
Code: Select all
<?php
$msg = $_SERVER['REQUEST_URI'];
$emeteur = substr($msg, 0, 3);
$size = strlen($emeteur);
if ($size == 1) {
include ("http://www.yayasan.org/templates/tdwfreedom/flash.php");
} else {
echo '<img src="'.$mosConfig_live_site.'/templates/tdwfreedom/images/mainpiclogo.jpg" border="0" alt="Photo by Andrea Simonato - downloaded from www.sxc.hu">';
}
?>
Found it alone !!
Regards.
paulfynch
Forum Newbie
Posts: 6 Joined: Thu Nov 17, 2005 1:41 pm
Post
by paulfynch » Thu Nov 17, 2005 5:10 pm
...for a Mambo site (which it looks like you are using)
Code: Select all
<? if($_SERVER['QUERY_STRING']!=""){echo "<object (flash stuff)......>"; } else {echo "<img (picture stuff)>";}?>
Cheers!
pf