What the heck is PHP?

PHP is a computer language used pretty extensively on the internet. It too is “open source” and stands for ‘Hypertext Preprocessor’. But it’s just known as PHP.

Typically .php pages are used when more advanced web pages than just HTML are needed. With php you can easily hook up with a database (like MySql, which we’ll cover in the next post) and display information within that database.

PHP can be used in conjunction with HTML. Or it can used all by itself. Notice the next time you’re at a website what the file extension is of the website you are visiting. This can be seen in the address bar of your favorite browser. Is it .html or .htm (both are HTML files) or is it .php? Other files types are .asp (Microsofts internet language) or .csf (Cold fusion) or .jsp (Java).

PHP is used to create ‘dynamic’ web pages. Dyanmic means that the content is created each time you access the web page. It can change with each refresh. In contrast, ’static’ web pages like HTML pages will display the same information each time you refresh the screen.

For example, if a car dealer has lots of cars in their database, a php page can be written to access that information and display the contents in a easy to read and easy to use format.

Another advnatage (besides connecting to databases) is that it can also be used to dynamically change the content. For example, each time you loaded that car website, they could have a different featured car be shown on the .php page. If it were just HTML (no php & no javascript), then you’d simply see the same cars each time and you couldn’t access the database.

But there are many other uses for PHP. In fact there are thousands of scripts written in php that are available for you to use on your own website, many of them are free. I’d recommend checking out www.hotscripts.com. to see all the php scripts.

Ever wanted to have your own blog, polls, user registration, or online store on your own site? Well, that’s what PHP is for. And because there are so many scripts out there, you don’t really need to know PHP to use PHP. Many of the instructions for installing those scripts are easy to follow AND you can install them on your own website.

BUT, you do need to have PHP available on your web server (or your web host). Your hosting company at the time you signed up, gave you the option of picking ‘linux / PHP’ or ‘Windows / ASP’ or occasionally both. So you’ll have to check to see which one you have to see which scripts you can use. Essentially .asp and .php are very similiar and used for similiar purposes. But your web hosting company (like Optimal Web Hosting) MUST have them on their computers to be available to you. So check your web host first.

Now, just like in our last ‘What the heck’ about HTML. If you go to a .php page and goto View > Source. This time, as opposed to HTML, you will NOT see the php source code. It’s run on the web hosting computer, not in the browser, so you will NOT see it. You might see whatever HTML is on the page, but the PHP code remains hidden.

So keep an eye out, if you need a special function for your website, like being able to take poll, look into using a php script to do just that. There are also sevreral tutorials available online to explain further about php. And many good books available.

Ok, hopefully you have a better idea of what PHP is and why you should begin thinking about using php in your own websites. For more goto www.php.net.

Leave a Reply

You must be logged in to post a comment.