//start Sesssions (on every pages ! )
session_start();
//.. here your connection code...
//if the user has been well authentified :
$_SESSION['userLogin'] = "something";
//the end of your code here
//start Sesssions (on every pages ! )
session_start();
$userLogin = isset($_SESSION['userLogin']) ? $_SESSION['userLogin'] : NULL;
if( $userLigin ) {
include("aside_profile.php");
}else{
include("aside_connection.php");
}