"It's not working properly" doesn't describe the problem.
But seeing as you're using $GET['id'] further down, why don't you use it at the top and have isset($GET['id'])?
And this is wrong:
$id1=$_GET['id'];
echo $id1;
if(isset($id1))
$id1 is always set - you set it just two lines earlier.
You need to see if a variable is set before you try and use it - not after.