For one thing, you're missing a closing } so you either need to add one to close the final else statement, or just remove the opening brace since the else statement contains a single operation, i.e.
if($blah == TRUE) {
// do stuff..
// do stuff..
} else
// do one thing.
Also, if 'id' is a numeric type in your MySQL table (I'm betting it is... at least, it should be) then don't use single quotes around the number in your MySQL queries
Lastly, if the whole 'if ($user > 0) {' bit is to check if they entered a number (and not text), then you're better off using [man]is_numeric/man to check this, because PHP will parse the string "1; DROP DATABASE test;" and see the 1 in the beginning and then stop when it comes to a non-numeric character, giving that string a numeric value of greater than 0.