If the above is showing the content of doctorwelcome.php then you need to go UP one dir level before going back down, so rather than:
include("./doctorlogin/".$page_name.".php");
you should be using:
include("../doctorlogin/".$page_name.".php");
Note two 'dots' rather than one, which is navigating (relatively) from the current "Pages" directory to its parent which is "Master", then "/doctorlogin/" is taking you back down into the dir where uploadimage.php resides.
Your use of "./" means simply "the current dir".