Warning: mysql_query(): Access denied for user ''@'localhost' (using password: NO)
<p>I have a project on localhost. I write many query in this project so far. But today i got a error that i don't know where is problem. can you help me?</p>

<pre><code>$user_id = signupinsert($name, $lname, $mail, $password);
    if($user_id&gt;"1") {
        $bank_id = insertinbank($user_id,"1","");
        echo mysql_error();
        $datetime = date("Y-m-d H:i:s");

        if($bank_id&gt;0) {
            $bank_log_id = inserttolog($bank_id,$datetime, "1", "0", "1", "1", "system signup");
            if($bank_log_id&gt;"0") {
                $id=$user_id;
                setcookie('$user_id', $id, time()+60*60*24*7,'/');
                header( 'Location: home.php' );
            }else {
                deletefrombank($bank_id);
                deletefromuser($user_id);
                deletefrommail($user_id);
                $content .= "error";
            }
        }else {
            deletefromuser($user_id);
            deletefrommail($user_id);
            $content .= "error";
        }
    }else {
        $content .= "error";
    }
</code></pre>

<p>Note: signupinsert and inserttobank both are in a same file. signupinsert is working but i got error in inserttobank.</p>
