You are not getting value of $id=$_GET['id'];
And you are using it (before it gets initialised).
Use php's in built isset() function to check whether the variable is
defied or not.
So, please update the line to:
$id = isset($_GET['id']) ? $_GET['id'] : '';