PHP $_session is not work in wordpress

Yes, you must use a small change for use session in WordPress.

if ( ! session_id() )
session_start();

Better you use a custom function

function my_start_session() {

@session_cache_limiter('private, must-revalidate'); //private_no_expire
@session_cache_expire(0);
@session_start();
}

*Please edit, I write from a mobile

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