how you are doing with this program ?which partis ready?
if you could make a users listing, you can make a link, and pass that userID to another page,
the user, who click, has the userID in session variable, lets add to a relation table their ID's.
$relation_user_1 = (int)($SESSION{'logged_user']);
$relation_user_2 = (int)($GET['relation_user_2']);
$query = "INSERT INTO users_relation_table (id,relation_user_1, relation_user_2, active, when_the_user_mark_you)
VALUES ('','$relation_user_1','$relation_user_2','N',NOW() )";
/ mysql_query and error handling here/
and you send email to that user, to make that relation confirmed. If the other user click to confirm, lets set that active field into 'Y'
And here is the table, the sql query to create this table:
CREATE TABLE users_relation_table (
id int(6) NOT NULL auto_increment,relation_user_1 int(11) NOT NULL, relation_user_2 int(11) NOT NULL, active enum('N','Y') NOT NULL default 'N', when_the_user_mark_you datetime NOT NULL default '0000-00-00 00:00:00'
,PRIMARY KEY (id),
UNIQUE KEY id (id)
) TYPE=MyISAM AUTO_INCREMENT=1;
And you can start with this i think.