Jump to content
xisto Community
Sign in to follow this  
nightfox1405241487

Friend Networking Script... Help! Adding removing friends

Recommended Posts

I'm creating my own friend network script which is going to be a combo of MySpace/Facebook and an AIM profile. One of the most important features is the adding of friends. The way to do this is probably simple & I'll kick myself when I see the code to do it. What needs to happen is a friend clicks a link which sends an internal message through the scripts messaging system (like a PM on a forum) to the other person to approve or deny the request. In that message, there needs to be a link to a page which executes a PHP script which updates the database adding both users to each other's friend list.I'm going to try and play with it a bit, but I doubt I'll be able to do it. BTW- I'm creating this to try and expand my PHP knowledge from beginner to moderate. All my PHP books are beginner based... looks like I should circulate my Amazon wish list to see if someone would be kind to buy me the PHP books I should be reading... :unsure:Thanks for ANY help. I'm currently going to finish up on the login system with access rights and try and get that working. Then I have to also get the message system working too. Then I can provide any database tables needed much more easily.[N]F

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.