blueberry920 What are the pros and cons for using a Linux server compared with a Windows one?
The cons for a Windows server: it's Windows. 🙂 Seriously, though, in my dozen or so years as a professional web dev, I've never worked in a windows web environment, so really can't answer that.
blueberry920 PHP, which was hacked within a very short time (I guess through MySQL injection)
Use the PHP PDO extension, and always use prepared statements with bound parameters for variables you feed into the query.
You might want to look into Docker, though it has a non-trivial learning curve. But once you grok it, it can be pretty simple to spin up a container on your development PC running the exact server environment you want to work with, and then there are hosting services out there where you can run the same Docker image -- meaning you're developing in the exact same environment you're going to deploy to.