Please, I need help, I'm creating a website, I want to put the system of followers, but I'm having trouble posting the system. I want the "index" of the site users see posts from your friends, but do not know to do this. Here's how I tried to do, I know what is wrong in this way, but I think it will help me understand.
*$result = mysqli_query($con,"SELECT * FROM posts WHERE userid='127' OR userid='2' ");`
//So it goes with every repitiendo "id" of my friends know what is wrong, please help me.
while($row = mysqli_fetch_array($result)) {
echo $row['post'] . " " . $row['userid'];
echo "<br>";
}*