jrapin Posted January 10, 2007 Share Posted January 10, 2007 Guys,What does this code do?<?php if (!strpos($_SERVER['HTTP_REFERER'],'faq.php')) { header("location: faq.php"); }?>Thanks Quote Link to comment https://forums.phpfreaks.com/topic/33595-php-code-question/ Share on other sites More sharing options...
HuggieBear Posted January 10, 2007 Share Posted January 10, 2007 I believe the short answer is...It's checking the page you came from, and if it wasn't faq.php then it sends you there. Quite useful to have on a contact page, to make sure people check your FAQ's first.RegardsHuggie Quote Link to comment https://forums.phpfreaks.com/topic/33595-php-code-question/#findComment-157394 Share on other sites More sharing options...
jrapin Posted January 10, 2007 Author Share Posted January 10, 2007 Dear HuggieBear,Thanks, I was wondering why whenever I linked to this page it sends me to the faq page.Now then, I will remove the code and see what happeds after I create a new hyperlink.Jrapin Quote Link to comment https://forums.phpfreaks.com/topic/33595-php-code-question/#findComment-157396 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.