i want help to build my logic?
<p>hey i guys i want help from you.
i am working on website project, in that i want to create "if user upload some data then it will be stored in his folder" for this i want currently login username.Because the folder name=username.
when user register to my website it will create folder in webspace which name=username.
now i want to take currently login username for defining path to uploaded image.
i give you example:</p>

<pre><code>if (isset($_SESSION['username']))
{
    $username=($_SESSION['username']);
    $CHECK=mysql_query("Select `status` from `user_reg` where `username`=$username");

    if ($check="Admin") {
    $userimage="/Place4Info/Data/Admin_data/".$username."/";

} else {
    $userimage="/Place4Info/Data/User_data/".$username."/";

}
</code></pre>

<p>i save path in <code>$userimage</code> &amp; then use it everywhere.
above code is not running</p>
