You need an Apache Server to run PHP
And it's not the problem of how hard it is, it's the problem that you can't do it with Javascript. You "can't". If you could, first, it's a big problem, theres an automatically bug out there. Like I saide before:
"Javascript can be easily seen by view source, which is not safe, because a hacker might use this source code to find bugs and intrude in. "
If you ever need help, visit
http://www.w3schools.com
You said something about the database, for database, mainly are SQL compliable. They work with PHP but do not work with Javascript
