What is PHP?

  jg1990 16:53 13 Mar 2004

I have been designing website for a month or two now but not totally sure what PHP is.

Could someone please explain?

Many Thanks


  Taran 18:01 13 Mar 2004

According to the PHP site click here

PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML.

My own addition to that is as follows:

PHP [Hypertext Preprocessor], like ASP [Active Server Pages], allows you to run a script or small program on a web server. Sometimes that will write information to a database, read it from a database, or process it from one web page to another web page.

Saying that it can be "embedded into HTML" is a perfect description of how it can be used. You can embed your PHP program into an HTML web page, the web server 'reads' the code, processes the commands contained in the PHP and returns only the HTML to your site visitors browser.

It is an immensely powerful and very popular method of running email form handlers, online e-commerce operations and dynamic sites where usernames and passwords are used.

This site is running using Cold Fusion which allows you to do very similar things to PHP and ASP. Your web browser 'sees' the HTML output but that HTML is generated by the dynamic language and the page content is pulled from a large database.

It's a brilliant solution for large sites. Imagine if this site was done using plain HTML pages. Every question ever asked in the forums would need its own page and pretty soon you'd be into the hundreds of thousands of pages.

Using Cold Fusion or PHP, you can have a template page that has your layout and colour scheme, but when a visitor clicks a link they 'query' a database with that link and fill the template page with information pulled from the database in that query.

I hope that helps and doesn't just make things more complicated.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Honor 9 Lite review

How Social Media has Propelled Political Graphic Design and Art in the Last Decade

The best kids apps for iPhone & iPad 2018

HomePod d’Apple : date de sortie, prix et fiche technique