Download any file after submitting a form [closed]

You can use “actions”. More info: http://hookr.io/actions/wpcf7_mail_sent/

Put this code in your functions.php:

function action_wpcf7_mail_sent( $contact_form ) { 
    // here your file redirect
    header("Location: http://yourfileurl.com"); 
}; 

add_action( 'wpcf7_mail_sent', 'action_wpcf7_mail_sent', 10, 1 );

let me you if it is working i cannot test right now.

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