And then if the person the other person is following they can then 'Fully Follow' the user.
It's working with a database and 5 tables
followfrom
followto
fullfollow
fullnamefrom
fullnameto
I want the system to do this.
1) If neither users are following one another, then display Follow for each user
2) If one user is following the other, display Follow Back, and nothing for the user Following already
3)If both users are fully following, display nothing for each user
I just can't crack it D:
Here is the code
if (isset($_COOKIE["user"])){
$sql = "SELECT * FROM follow WHERE followto = '$id'";
$query = mysql_query($sql) or die(mysql_error());
if(mysql_num_rows($query) < 1) {
if($row['followto'] == $id){ }else{
echo " <div class='nav'>
<form action='newfollow.php' method='post'>
<input type='hidden' value='".$id."' name='linkto'>
<input type='hidden' value='".$_COOKIE['user']."' name='linkfrom'>
<input type='hidden' value='".$row['fullname']."' name='fullnameto'>
<input type='submit' value='Follow' class='fb9' name='submit'>
</form>
</div>";
}
}else{
if($row['fullfollw'] == 0){
echo "<div class='nav'>
<form action='fullfollow.php' method='post'>
<input type='submit' value='Follow Back' class='fb9' name='submit'>
</form>
</div>";
}else{ }
}
}


Sign In
Create Account


Back to top









