JavaScript is a cross-platform, object-oriented scripting language. JavaScript is a small, lightweight language; it is not useful as a standalone language, but is designed for easy embedding in other products and applications, such as web browsers. Inside a host environment, JavaScript can be connected to the objects of its environment to provide programmatic control over them.
PHP is a very powerful server-side scripting language like ASP for developing dynamic web applications. Using PHP, you can build interactive and dynamic websites with ease. All the PHP scripts are executed on the server (Apache, IIS etc) and it supports various databases; however, it is mostly used with MySQL. Another reason for the ever-increasing popularity of PHP is that it is free to download and use.
In the world of Web programming, AJAX stands for Asynchronous JavaScript and XML. AJAX techniques are used to allow a website to communicate with the server without having to load a new page into the browser. By communicating with the server while the page is still loaded, data can be retrieved and dynamically inserted into the existing page. In the same vein, elements can be removed from the page, or altered as required.