Error inserting into custom table – Object of class wpdb could not be converted to string [closed]

$wpdb->$table_name is not a valid table name. Use $table_name

$wpdb->query( $wpdb->prepare(
"
 INSERT INTO $wpdb->$table_name
( first_name, last_name, email,telephone,user_name)
VALUES ( %s, %s, %s,%s,%s )
",
$first_name,$last_name,$email,$telephone,$current_username
) );

should be

$wpdb->query( $wpdb->prepare(
"
 INSERT INTO $table_name
( first_name, last_name, email,telephone,user_name)
VALUES ( %s, %s, %s,%s,%s )
",
$first_name,$last_name,$email,$telephone,$current_username
) );

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