What lilleman gave you works to make sure the variable string isn't left empty, but about the only way (I can think of) to monitor and make sure it just isn't changed in the browser is to tie sessions in. So, when the user first hits the site, it creates a session with that variable. Then if it is changed, the page checks the variable against the one in the session, and if it doesn't match, you halt the script. If it does match, go on... Also, if it is blank, then you stop the script. Lastly, if they just type the entire URL in with their own ID, then there is no session set yet... stop the script.
That about covers all scenarios. Not sure if there is a "better" way, but that's what I would do personally.