stopping ppl from selecting a section within the url



The key question is how would someone legitimately get into the section in the first place? If it is via a public link, then I wouldn't worry, they will get there anyway (and they are just making work for themselves by entering the hard way), but if it is only after a login, then session info can help you out here.

When they login you can store session info, so all you need to do is put a check in each section you want to restrict:

if($_SESSION['username']) { // or any value

//section content


else {

You are not authorised to view this section //or even use an automatic header redirect back to index.php


Not sure if this is what you are looking for, I think the only other way is to track the method that they used to get to the site, and if it is not internal use the redirect.

Hope this helps.