how do i get the page name?? when running a script?
just the file name or the relative url? not sure if this is what you want.
echo $_SERVER['SCRIPT_NAME'];
i only want the name not the path
basename($_SERVER['SCRIPT_NAME']);
very clever chap you are!
try doing this next time you need to get something
foreach($SERVER as $curvar) { echo "\$SERVER['$curvar'] = " . $_SERVER[$curvar] . "<br />\n"; } //end foreach
You can do that for any of the build in arrays which are listed at http://us2.php.net/manual/en/language.variables.predefined.php