Forum Replies Created

Viewing 1 replies (of 1 total)
  • How do you get it to redirect. I put this code in my functions.php file:

    add_action( 'wpcf7_mail_sent', 'your_wpcf7_mail_sent_function' );
    
    function your_wpcf7_mail_sent_function( $contact_form ) {
    	$title = $contact_form->title;
    	$posted_data = $contact_form->posted_data;
    
    	if ( $title == 'Newsletter Signup' ) {
    
    		$email = $posted_data['email'];
    
    		header('Location: https://campuzoic.us2.list-manage1.com/subscribe?u=e014c12069e8858be934de06e&id=e5c704e1b9&MERGE0=$email');
    	}
    }

    but it doesn’t redirect. What am I doing wrong? Please help! (And keep in mind that I know ZERO PHP, this is all just copy and paste. However, I am a programmer so I understand what is going on, I just don’t know the syntax)

Viewing 1 replies (of 1 total)