do a search $_SERVER['PHP_SELF'] - it should answer all your question.

if in doubt a var_dump() can do wonders (in this finding out what kind of
info is generally available, e.g.:

<?php

echo '<pre>';
var_dump($_SERVER, $_REQUEST, $_ENV, $_POST, $_GET);


Schalk wrote:
Greetings All,

Possibly a very simple question but here goes. How would I code the following in PHP?

if(window.location == (("http://www.epda.cc/index.php";) ||

php doesn't know what the location url of a window is - it's doesn't
even know a browser windwo exists (to php it doesn't actually exist)

it does (often) know which url referred it to the current script and
it knows which url was requested.

("http://www.epda.cc/";))) {
       $current_nav = "includes/home_nav.php";
   } else {
       $current_nav = "includes/inside_nav.php";
   }

What I am trying to accomplish is something like this:

<?php if(window.location == (("http://www.epda.cc/index.php";) || ("http://www.epda.cc/";))) {
       $current_nav = "includes/home_nav.php";
   } else {
       $current_nav = "includes/inside_nav.php";
   }
   ?>
   <?php include($current_nav); ?>

conceptually those 2 bits of pseudocode are identical - at least to me.


Thanks!


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to