Show div depending on user logged in
<pre><code>$getquery = mysql_query("SELECT * FROM it_task ORDER BY task_id DESC");

while ($rows = mysql_fetch_array($getquery))
{
    $id= $rows['task_id'];
    $date=$rows['date'];
    $project=$rows['project'];
    $topic=$rows['topic'];
    $instby=$rows['instby'];
    $inst=$rows['inst'];
    $dline=$rows['dline'];
    $ocome=$rows['ocome'];
    $comm=$rows['comm'];
    $fin=$rows['fin'];
    $dellink="&lt;a href=\"delete.php?id=$rows[task_id]\" id=\"editnow\"&gt;Delete&lt;/a&gt;";
    $editlink="&lt;a href=\"edit.php?id=$rows[task_id]\" id=\"editnow\"&gt;Edit&lt;/a&gt;";

$admin = "MJH";
if(($instby == $username)||($instby == $admin))
    {
        echo "&lt;div id=\"editcont\"&gt;$editlink $dellink&lt;/div&gt;";
    }
    else if($inst == $username)
    {
        echo "&lt;div id=\"editcont\"&gt;$editlink &lt;font face=\"Trebuchet MS, Arial, Helvetica, sans-serif\" size=\"2\"&gt;Delete&lt;/font&gt;&lt;/div&gt;"
    }
    else
    {
        echo "&lt;div id=\"editcontdisabled\"&gt;Edit Delete&lt;/div&gt;";
    }
</code></pre>

<p>.in my code above what i want to do is to show a  containing links depending on who is logged in.. however, when the admin logs in he will be able to see the  containing $editlink and $dellink.</p>

<p>.I can't seem to find where exactly have i gone wrong.. please help me with this guys! TIA! More Power!</p>

<p>.this is what my code looks like.</p>
