Applying checks using the isset() language construct will supress errors and allow you to access array keys that may not exist. Here is a small function for transparent existance of a value.
$myID = getInput('id'); // Returns 'null' if ID doesn't exist but throws no PHP errors
$myID = getInput('id', 50); // Returns 50 if your ID doesn't exist
With this you can perform validation checks to make sure you have an ID
if( ($myID = getInput('id', 0)) < 1) {
die('Invalid ID Value');
}
die("My ID is: $myID");
function getInput($key, $default = null) {
return isset($_GET[$key]) && $_GET[$key] != null ? $_GET[$key] : $default;
}