OK, with almost 3 years of self defense knowledge under my belt, I will give you the best advice for that situation:
At Gun and/or Knife point:
The best thing to do is to just give them everything you ask. Your life is not worth something that can be replaced. It won't be easily replaced, but it can be. Your life is much more valuable than inanimate objects.
Now, since they took your cell phone, i would highly, HIGHLY suggest that you have your membership cancelled and prevent any phone calls being made and having to pay money that you shouldn't.
Other than that, report this to the police. With muggers, they just don't do it to one person, they do it multiple times. Chances are that it has happened to somebody else and they have reported it to the police. With multiple accounts for the police, they would have mor incentive to find and arrest this man. Make sure, if you do go to the police, give as much of a description as possible, including clothing, hair (if possible. he was wearing a hat, wasn't he?), skin pigment, facial hair, etc.
As for prevention of this sort of thing happening, I would go with CurryMonster's idea of the group or bus. What city are you in? Not NYC, are you?
"Do or do not, there is no try" -Yoda
I'm gone...