new Member() is correct, It looks like you have a Class AddMember which extends Member - that is slightly weird, if AddMembers() is just a helper function you don't need to extend member. Also, where are you trying to invoke the AddAMember function?
thank you , This make more sense now ;)
The reason I am doing this is because i Need to get something like Facebook connect working .
I have opened a topic to try fix FacebookConnect but no one replied yet . http://www.silverstripe.org/general-questions/show/19776
I ma trying to use the xample provied by facebook to get the visitor to login from my website & pull the data then use the php code above to add the member to the data bse. I know its not the best way, but the only way if i cant get FacebookConnect module working.
If you have time, please have a look at the FacebookConnect module , I was told it only need some basic updates to mach the new facebook code ?