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 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 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 Link to comment https://forums.phpfreaks.com/topic/33595-php-code-question/#findComment-157396 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.