Friday, 9 August 2013

PHP Friends System Tips

PHP Friends System Tips

I have been looking around the web for tips, scripts and tutorials on how
to add a friends system to a php members website. The stuff I did find was
very old or lacking in detail so I thought I should just make it myself.
Can people help me get started? :)
I was thinking of the idea of a table with 3 or 4 fields: Main Id, Member
1 ID(sender), Member 2 Id(Reciever), Friend Since.
But I dont quite know how to arrange the php/mysql code on page to
friend/unfriend users.
Any help would be very appreciated.
How do I record the ID of the user profile I am on... $_SESSION['id'] (the
member logged in) would be member 1 in the table, and the profile I click
on to add as a friend while i am logged in would be member 2 if that makes
sense? Its easy to get the SessionID, but how can I record the other ID?

No comments:

Post a Comment