Why use PHP?
PHP is a server side code, which means that before your visitor ever sees a thing on your site, the server is told to perform some functions and first. For example, you might tell the server “Get today’s date, put in a certain format, and show it in this table… then send the html to the visitor.” The great thing about php is that except for the fact that the page ends with .php, all they see is html if they view the source code. In contrast, JavaScript is a client side code. Your visitor has to have Javascript turned on and installed in order for all the neat javascript to work on your website. The good news is that most people have javascript enabled on their browsers. So, where PHP would get the time and date from the server, you could have a similar javascript program that gets the time and date from the visitor’s own computer. Both codes have pluses and minuses… but the fact that php works on everyone’s computer (since it does all the magic at the server) I’ve focused my efforts on PHP. There are other differences between javascript and PHP, but that’s not the issue right now. PHP can be used for partically many applications and sides of the online life, some things of which I have used PHP in the past for:
- E-commerce.
- Password protection.
- Advertising.
- Database management.
- Auctions.
PHP is quick to learn, and quick to develop (in an environment free from distractions). It is faster than pearl, simpler than c and just better than ASP for every reason possible. The PHP reference is useful and complete with good examples and user contributed notes, probably the most helpful help manual I?ve ever used. PHP with mySQl is very easy to develop and use and probably the best language to use for any dynamic site or business / shopping site, though only just better than c because of its short development time, and general easiness. If you know c, c++ or any other ?proper? programming languages you will find PHP extremely easy. Unlike ASP (which is based on a shitty VB) its structure has many similarities to c and c++ as well as JavaScript. Unlike sites made in c it is very easy to switch between PHP and HTML in a page, and small pieces of PHP code can easily be inserted into HTML documents.