Set id of cf7 in the data save function [closed]

Try this:

// Get current form.
$wpcf7      = WPCF7_ContactForm::get_current();
$contact_form_id = $wpcf7->id;

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