Another tidbit of info when using $GET (or even $POST) variables: Make sure they actually exist before you try to use them. If your code depends on these variables, you can do something like this:
if(isset($_GET['ID'])) {
// ok, the ID is in the query - do stuff here
} else {
echo 'No ID found in query!';
// no ID passed... what do we do now?
}
If not, you can tell PHP, "use the ID provided in the query string OR, if one isn't provided, use (this)" such as in this code:
$id = (isset($_GET['ID']) ? $_GET['ID'] : 0);
Note that I used the ternary operator in that example.