TutorMe Posted September 7, 2007 Share Posted September 7, 2007 Is there a way to check if a page was called from another page? Like if I have a link on a page called "index.php" that links to "register.php," can I put a code at the top of "register.php" that checks if it was opened through "index.php?" Sorry if that's confusing. Link to comment https://forums.phpfreaks.com/topic/68413-referenced/ Share on other sites More sharing options...
lemmin Posted September 7, 2007 Share Posted September 7, 2007 $_SERVER['HTTP_REFERER'] will contain the URL of the page that linked to the current one. If you use basename on it, you can get just the file. echo basename($_SERVER['HTTP_REFERER']); Link to comment https://forums.phpfreaks.com/topic/68413-referenced/#findComment-343952 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.