Insert Query not working in the form

I figured out my error in the query, Thank you all guys for responding, I just gave the piece of code

  <?php
  global $wpdb;
  $contactus_table = $wpdb->prefix."contactus";
        //error with the query 
        $sql = "INSERT INTO $contactus_table (firstname, lastname, email, query, reg_date) VALUES ('$firstName', '$lastName', '$email', '$query', CURRENT_TIMESTAMP)";

               if($wpdb->query($sql)) 
               {
               $BlogName = get_bloginfo();
               echo $BlogName;
               }
   ?>

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)