I am trying to make a hospital management system in php, so that atleast 4 hospitals are going to use it, and every hospital needs a special domain to login to the system. My question is how can i manage all these domains and databases to use one single host and also how can i send notifications if there is an update to the system.
Your question needs a little more details, but in general this is how it works.
I assume your a sys admin, and you will work on a Linux system, using apache.
You need to create users in the server, or at least different directories for all your websites, usually they will be under /www/{name of the site}/*
You will need a DB per each customer
You need to define if they will access only with different domain name or also in different tcp ports, usually multi-web-hosting happens all in port 80 or 443.
Read about Virtual hosts in apache, because the magic will happen there. https://httpd.apache.org/docs/2.4/vhosts/examples.html
This is how a single block will look like.
<VirtualHost 172.20.30.40:8080>
DocumentRoot "/www/example1-8080"
ServerName www.example.com
</VirtualHost>
*Forgot about the notifications, this depends a lot of your infrastructure, you can use emails, for that you need to configure sendmail or your favorite email server, you can also use push notifications if you have the web infrastructure to do so, etc.