Jump to content

Archived

This topic is now archived and is closed to further replies.

reaper7861

pulling the ?page=whatever.php

Recommended Posts

ok im using a page style such as index.php?page=main.php and want it to echo out the page its on for insertion into a tracking system, all i have gotten it to do so far is give index.php with phpself is there another function i could use to call the full page info,i need it to output the info after the ? such as page=main.php.

Thanks in advance
crazy

Share this post


Link to post
Share on other sites
$_GET['page'] will give you "main.php"
$_SERVER['SCRIPT_NAME'] will give you "index.php" or "folder/index.php" if you're not executing from the root.
$_SERVER['QUERY_STRING'] will give you "page=main.php" (I think)

Share this post


Link to post
Share on other sites
Ok i feel completely stupid now...i didnt even think about that....THANKS it works perfectly.
$_GET['page'] worked perfect.

Crazy

Share this post


Link to post
Share on other sites

×

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.