Change Default Content when Creating a Post based on Previous Category Choice

You should have linked to the original Q&A since the beginning…
Another great code from @JanFabry, btw 🙂

Force category choice before creating new post?

Using exactly the code provided in his answer, this is how to make the filter default_content work:

add_filter( 'default_content', 'wpse_71772_default_content', 10, 2 );

function wpse_71772_default_content( $content, $post ) 
{
    if( !isset( $_REQUEST['category_id'] ) )
        return $content;

    switch( $_REQUEST['category_id'][0] ){
        // change this to your desired category ID
        case'1':
            $content="cat 4 content";
            break;
        case'3':
            $content="news content";
            break;
        default:
            $content="default content";
            break;
    }
    return $content;
}

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