Leatherback: Thanks for that sample code! It was easy enough for me to follow without any books...but now that today I've borrowed a couple from library, I've got some followup questions:
1) I'm presuming if instead of sending users back to main page, I could use the header stmt to send a HTTP error code msg instead? Such as a 401 Unauthorized?
2) I'd need an easy way for me to access any page directly without this block, since I'm the site owner! I can't use cookies as I may be on another computer that doesn't allow it. Is there some mechanism that would handle this?
3) In some examples, after the header stmt, I've seen an "exit ()" stmt used. What makes that a good or bad idea? I don't find any reason why to or why not.