A lot of people will have different opinions and favourite languages for many reasons, so it will come down to personal choice. PHP is the most popular and probably the easiest to learn because there is so much help and information available online. A suggestion would be to use PHP with something like Codeigniter which allows you to write good, secure code without having to make too many mistakes as a learner first. It's very easy to write bad code with PHP which is why you need to be mindful from the start,
Well, depending upon your code. I don't think it is inherently unsecure. I suppose this also depends on what the website is doing. If you're writing code for a banking institution to allow their customers to bank online then you'd possibly be using something else. If you're writing an online app/site which holds customer data etc. I think you can write your code very securely?
Hi: I may be one of the very few people in the world who use a C-based executable to act as CGI server app. My app is compiled using the Harbour Language (ng: comp.lang.xharbour). This language has embedded in it all the database power needed for SQL and xBase access, is of course secure, and has built-in all the functional power you could ever need with a simple easy-to-understand syntax.
So, if you *know* a compiled language and use it for other business purposes, then why not use it to create CGI apps ?
I must say that I've seen tremendously impressive results from people using GWT (but that's a framework I guess). For clarity purposes: I'm talking about Google Web Toolkit [developers.google.com...] The language as such: I don't believe it's all that important. You want to use a language your developers know (or choose your developers to match the language you're using).