How to browse profiles on my social network?
<p>In my social network I am stumped. i have built a pretty decent one but the ability to browse profiles by using their name (http://www.theqlick.com/usernamehere) to view their profile. </p>

<p>So people post on someone's virtual pinboard and in return are able to view their profile by clicking on them and their profile pops up, like on Facebook. But i am redirected to no url, i don't see what is wrong and can anyone suggest what is wrong and how i should do it? </p>

<p>My code is below:</p>

<pre><code>  &lt;?
  $getposts = mysql_query("SELECT * FROM posts WHERE user_posted_to='$username' ORDER BY id DESC LIMIT 10") or die(mysql_error());
    while ($row = mysql_fetch_assoc($getposts)) {
                    $id = $row['id'];
                    $body = $row['body'];   
                    $date_added = $row['date_added'];
                    $added_by = $row['added_by'];
                    $user_posted_to = $row['user_posted_to'];  

                                            $get_user_info = mysql_query("SELECT * FROM users WHERE username='$added_by'");
                                            $get_info = mysql_fetch_assoc($get_user_info);
                                            $profilepic_info = $get_info['profile_pic'];
                                            if ($profilepic_info == "") {
                                             $profilepic_info = "./img/default_pic.jpg";
                                            }
                                            else
                                            {
                                             $profilepic_info = "./userdata/profile_pics/".$profilepic_info;
                                            }


                    echo "
                                            &lt;div style='float: left;'&gt;
                                            &lt;img src='$profilepic_info' height='60'&gt;
                                            &lt;/div&gt;
                    &lt;div class='posted_by'&gt;
                    Posted by:
                                            &lt;a href='$added_by'&gt;$added_by&lt;/a&gt; on $date_added&lt;/div&gt;
                                            &lt;br /&gt;&lt;br /&gt;
                                            &lt;div  style='max-width: 600px;'&gt;
                                            $body&lt;br /&gt;&lt;p /&gt;&lt;p /&gt;
                                            &lt;/div&gt;
                                            &lt;hr /&gt;
                    ";
</code></pre>

<p>} </p>
