open the attached picture first.
Add a new line to the table "user" for the new user.
table "user" has id,username,password,email,mail,has_an_account(true/false) and for the new use it is true.
load the contact list inside "user" false as a value for has_an_account
verify that the user new contact is in fact new and don't already exist in the database. verify that the list of contact loaded does not contain a repetition.
fill the table "sended" it has id,fromid,toid,sent
fromid gets the id of the current new user and toid gets the id of new contacts. sent gets false.
store the credentials that the user gave to load his contact list in the table "credential".
id,userid,username,password,site
: witch sites you can add from the list bellow should be specified with your bid.
[login to view URL]
you can do it.