PHP/mySQL

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 application environment (PHP server) to prepare the information before it goes back to your browser.

You might think at first glance this page 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.

Look at this date/time stamp February 6, 2012, 12:56:18 pm and refresh the screen a few times using F5

- clearly this page is no longer a static one.

The file that the server sent to the PHP application server contained the following line of code:

<?php echo(date("F j, Y, g:i:s a")) ?>

If you view the source of this page in your browser you won't see this code. This is because the PHP server has executed that code -- which says to print the current date and time (of the server) to the browser according to a specific format. It is important to note that because this code is running on the server, this code will return the date and time of the server, not of the computer where the browser is running.

If you click on the following link, you will see what will have happened without the .php extension on the webpage.

http://www.web-untangler.com/typephp.html

Pretty cool -- huh.

Clearly PHP is capable of doing more than just extracting date and time information from the server. It is a full featured

 

PHP Keys