Just to stress the point even more...
You should never place user-supplied data (e.g. anything from $POST, $GET, $COOKIE, and even some items from $SERVER) directly into a SQL query! Instead, you should escape it with a function such as [man]mysql_real_escape_string/man or take other measures to ensure you're getting the data you're expecting (ex. casting $_GET['id'] to an integer when using it in a query).