Jump to content

pagie

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

pagie's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello, I was hoping someone would be able to help me with a script which me and my friend have written. I cannot for some reason get it to work correctly. I am very new to PHP and this is my first time on the forums so if there is something blatantly obvious, please just laugh on the inside... [img src=\"style_emoticons/[#EMO_DIR#]/wink.gif\" style=\"vertical-align:middle\" emoid=\":wink:\" border=\"0\" alt=\"wink.gif\" /] I have a flash file which I want to display a new image depending on which page I am on. Anyways, here is the script... any help would be much appreciated! /* this line will return the path and filename from document root ie [a href=\"http://www.tom.com/test/example.php\" target=\"_blank\"]http://www.tom.com/test/example.php[/a] the result will be /test/example.php */ $url = $PHP_SELF; /* I want to break down the $url to the filename only - so I am going to tokenize on the / character initially ie above will provide 3 tokens stored in a variable titled $url_pholder 1 - "" 2 - "test" 3 - example.php */ $url_pholder = explode("/", $url); /* The filename is always the last token therefore only want that one last token is (length - 1) element of the $url_pholder array - therefore work out length then extraxt it */ $pholder_length = count ($url_pholder) - 1; $url = $url_pholder[$pholder_length]; // example.php if ($url == "index.php") { echo if(this.mcImage == Number(this.mcImage)) {loadMovieNum("banner_1.jpg",this.mcImage); } else { this.mcImage.loadMovie("banner_1.jpg"); }; } elseif ($url == "2.php") { echo if(this.mcImage == Number(this.mcImage)) { loadMovieNum("banner_2.jpg",this.mcImage); } else { this.mcImage.loadMovie("banner_2.jpg"); }; } elseif { echo if(this.mcImage == Number(this.mcImage)) { loadMovieNum("order_wines.jpg",this.mcImage); } else { this.mcImage.loadMovie("order_wines.jpg"); }; };
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.