Force Log in to view a page

In a template file, this should do it:

<php
If (!is_user_logged_in())
{
   wp_redirect( "start/login" );
   exit();
}
?>

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