D1J1T Article Categories:

Programming   Management   Development   Design   HTML   JavaScript   CSS   PHP   MySQL   Database   Server   Audio   Object-oriented Programming   Hosting   Mobile   Social Networking   Java  

PHP (Hypertext Preprocessor)

Dynamic, Database-driven Pages Anyone?

by D1J1T — in PHP — Updated: Mar 1, 2014 at 9:38 am

The goal of the article is to provide a simple overview of the features of the PHP programming language.

*** If you are new to programming and your goal is to learn this language, I'd recommend learning HTML first. ***

PHP contains and renders HTML code. (Also CSS & JavaScript)

A basic understand of web programming using HTML should be gained first in order to understand basic page structure and in turn, be able to better comprehend PHP modules and to fully appreciate its object-oriented structure.

PHP is an open source scripting language that is free.

It runs on most platforms and servers and works with many different databases.

Great, but what can PHP do exactly?



Though technically, some dynamic content can be generated using JavaScript or DHTML, these languages run on the client-side. PHP runs on the server and can be used to create fully modular dynamic page templates. Keeping in mind that PHP can contain and render HTML/CSS/JS, a "header" php file could be created containing the necessary HTML/CSS/JS code, includes <head>, <title> data, the logo img code, and let's say even the top navigation system, etc. This can then simply be included/called to in each page. Pages, or better yet, modules can be created for any section common to all pages of the site, like "footer", "nav", "widget", whatever you like. This makes updates quicker; edit one file, all pages automatically are updated throughout the site.

PHP works beautifully with a database, again for dynamic content, an example based on user "x": pull her "name","jobtitle","email", etc. This could be written into a module and would disply this data based on the user logged in currently only. (Of course, SQL and a database are required).

PHP can manipulate files ON the server. Create, read, delete, etc. And not just other php files. PHP can read and generate numerous file types: pdf, xml, even Flash swf files can be generated.

PHP can collect user and form data, (validate forms also) generate emails to send to that user, and store that info in a database as well.

PHP can add security/access levels with sessions, encryption, send/get cookies.

Many advanced applications are written in PHP: user systems, blogs, admin interfaces, statistical apps. Many existing applications and frameworks work well with PHP: Wordpress, Facebook API, PHPExcel to generate custom Excel files to name just a few.


If you find these articles to be helpful, I could always use another cup of coffee! Social media likes/+1s are also much appreciated. Thanks for reading!

Add Comment to Post: