I have created a basic signup/login form with PHP.
Now I want to let my website create a subdomain for every user signed up on my website.
For example, My domain is "mydomain.com" and "Tom Smith" registers through the 'register form' with his name. I would like my website to automatically create a subdomain: "tomsmith.mydomain.com".
What is the best way to do this?