"John" <gt*****@mail.gatech.edu> wrote in message
news:bj**********@news-int.gatech.edu...
Hi,
How do I print different code depending on the URL?
For instance:
<?
if url="page1.php" then print("hi");
if url="page2.php" then print("hello");
if url="page3.php" then print("howdy");
?>
Thanks in advance :-)
Use the value of $_SERVER['PHP_SELF'] or $_SERVER['SCRIPT_NAME'] to
determine the name of your parent script... other variables like this can be
seen if you call phpinfo(); Examine the output but be aware that some of the
variables are optional (in such that some variables are created by the
client (ie your browser) and some browsers provide more information in its
headers then other browsers).