my method of paypall

1)customer purchases something from my site,buy now button goes to paypall he makes the payment,once the payment is made ,he comes to return url what i have specified.

2)when he comes to that url with his userid then on the form load this user id is updated in the database with the type of transaction he made

THIS IS MY WAY OF UPDATING THE DATABASE

NOW HOW TO DO THAT USING IPN IPN IPN IPN IPN

1) i got ipn page with some c# code

2) i have to specify the ipn url in my website paypall account

i read when the payment is made paypall sends something to my ipn page then this ipn page something back to paypall

BUT MY QUESTION IS IS HOW TO UPDATE MY DATABASE OF THIS USER WHO MADE THE PAYMENT

for eg i send userid and say userregistration as my transaction to paypall

now in ipn how to track this userid and userregistration thing so that i can make this user as paid user.