Facebook-like profile pictures php
<p>I have a forum website. </p>

<p>I am developing profile images and I am sort of stuck.</p>

<p>I have a code that returns profile pictures but only your profile image and if your logged into your account, it doesn't work to view your image on another account. </p>

<p>Basically, I don't really know how to explain it in words, but a Facebook like profile pictures feel where your profile picture can be seen by others and vice versa. </p>

<p>Also the login-user name table is different to the name posted in the answer. They have been both been mysql_fetch_assoc to the variable $row. Imagelocation is where the profile image is stored, a_name is where the user posts their name in the answer and name is where the user is in general login terms. </p>

<pre><code>        $name = $_SESSION['name_of_user'];
        $query = mysql_query("SELECT * FROM fgusers3 WHERE name='$name'");
       $row = mysql_fetch_assoc($query);
       $location = $row['imagelocation'];
</code></pre>

<p>That is the code at the top of the page, queries etc. Below is the row in the table i  am trying to add the profile images to. </p>

<pre><code>       &lt;td width="12%" style=";" bgcolor="#F8F7F1"&gt;&lt;? if ($rows['a_name'] == $row['name'] ) {
echo "&lt;img src='$location' width='100' height='100'&gt;";
      }  ?&gt;&lt;/td&gt;
</code></pre>
