Dynamic Content - PHP

PHP is an application development environment that runs server-side (the computer where the website is hosted). When the server sees the .php extension on this file, it sends the page to the PHP server to prepare the information before it goes back to your browser.

You might think at first glance it looks just like all of the other html pages you have already seen on this site. And that is in fact mostly correct. PHP programs can be and usually are intermixed with regular HTML, CSS, and Javascript.The big difference here is that part of what you are seeing displayed on the screen has been produced within the PHP server using program code that you will not see. (Even if you view the source code, the source code includes only what is displayed and comments.)

Look at this date/time stamp and refresh the screen a few times using F5

Notice that the date and time is no longer displayed. The server did not know to send it to the PHP application environment and instead sent it directly to your browser. If you look at the source code, you see that the php code is there, but has been ignored by the browser because the browser is not able to interpret php code.

Now close this window and go back to the php page.

 

 

PHP Keys