Northern Flame Posted July 15, 2007 Share Posted July 15, 2007 I'm not sure if it's possible to do this or not, but I have two files, page1.php and page2.php How can I have it so that only the people that are comming from page1.php can view the contents of page2.php So heres how it will work, the user must be at page1.php and then go to page2.php, or else it will echo an error message. Can this be done? Quote Link to comment Share on other sites More sharing options...
infid3l Posted July 15, 2007 Share Posted July 15, 2007 I'm not sure if it's possible to do this or not, but I have two files, page1.php and page2.php How can I have it so that only the people that are comming from page1.php can view the contents of page2.php So heres how it will work, the user must be at page1.php and then go to page2.php, or else it will echo an error message. Can this be done? <?php if (stripos($_SERVER['HTTP_REFERER'], "http://www.mysite.com/page1.php")) { // show content } else { // get out of here! } ?> Quote Link to comment Share on other sites More sharing options...
Northern Flame Posted July 15, 2007 Author Share Posted July 15, 2007 thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.