The best way to do it is to pass the id variable in the url, then grab it and use in your query. In the code I gave you, i just substituted the id with 1 to see if it would work.
Also, to get the php highlighting, put your php code within
[ p h p ] php code goes here [ / p h p ]
(except i put spaces between the brackets and php and /php. When you use it, don't use any spaces.
Hmm, the resource id #2 is weird. I've seen it before in other people's work, but I'm not too sure what it means. Try getting rid of the mysql_error() part.
Cgraz