Jump to content


Photo

pulling the ?page=whatever.php


  • Please log in to reply
2 replies to this topic

#1 reaper7861

reaper7861
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 06 June 2006 - 07:30 PM

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

#2 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 06 June 2006 - 07:34 PM

$_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)

Info: PHP Manual


#3 reaper7861

reaper7861
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 06 June 2006 - 07:37 PM

Ok i feel completely stupid now...i didnt even think about that....THANKS it works perfectly.
$_GET['page'] worked perfect.

Crazy




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users