Actually that sounds really simple to do:
What you want to do is, when User A clicks on User B's name to add her to his friends, your system stores to a database (whatever you are using, text files are fine) record that A requests "friendship" from B. You'd probably want to use some unique IDs (like ID numbers or email addys or however you identify your users) . Then everytime a user logs in, the list for friendship requests is checked in case there are requests for this user. If there is, a dialogue to allow or deny is viewed.
Implementing notifications of new requests should be quite straightforward to do, if you want to.
Welcome to AstaHost - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!