As3 php member site logged in member can assess thier folder only! protects others!

I have a as3 flash and php member site that when members sign up they get a separate folder for their own content. How can I protect each member from others members seeing in their folder? Can I make cookies restrict the user to only access their own folder if their logged in only?? If so how? Anyone ever solve this issue?? I think cookies feel like the direction I should go with but I’m lost?? Any source php codes or example you guys got to share??