title: PHP security question
body: <p>If I want people only accessing a certain page on my webpage by using a link within my website, and not typing it in the address box then would this do...</p>
  
  <p>Please note that the user would first have to login to their account and all member pages have been set so that the user must login into their account before accessing member pages.</p>
  
  <pre><code>if (isset($_SERVER['HTTP_REFERER'])) {
  
  // show page content
  
  }
  
  else {
  
  header('Location:http://');
  exit();
  }
  </code></pre>
  
  <p>Am I correct in saying, that if a link is clicked then the page will show, but if the link is not clicked and the address of where the link points to is typed in the address bar it will do a redirect. </p>
  
  <p>I am asking as the link will direct people to a form, and I don't want that form being accessed without first having some variables set on the previous page, or being accessed without logging in (as people could create their own link on another website which points  to the same location) </p>
  
  <p>Thanks</p>