Need help with password security. How to store?

I’m making a page that needs to be password protected. Storing it in the actual flash file isn’t an option because it needs to be changable by the user (unless there is some way I can overwrite the swf which I think is impossible).

So my question is, what’s the most secure way to store this file while still bieng able to write to it? If possible I’d like to stick to php and xml.