hello guys am creating site were all users can post for there friends to see ans coment just like facebook where am having problem is how to make sure only a users friends can see there post not the whole site members i have table in my database called post where all post are queried from and displayed on the page according to there date of post i dnt know how to remove the post of non friends from being visible to every one just the way facebook is thanks
isaac.iji.5
0
Newbie Poster
Recommended Answers
Jump to PostSorry but I don't want to download your code and go through it all - I want you to post the relevant sections of code on here
Jump to PostGiven:
…
1) You have a column named 'friend_ids' which contains a comma-separated list of friend IDs, like so: "1378,1892,461,1781".
2) Your posts table uses user_id as a column to identify who made the post.
3) You have a local variable named $user_id that holds the id of the current user
All 6 Replies
simplypixie
123
Posting Pro in Training
isaac.iji.5
0
Newbie Poster
simplypixie
123
Posting Pro in Training
Lsmjudoka
0
Junior Poster in Training
diafol
isaac.iji.5
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.