PHP & MySQL Basics Why PHP as a web development language?
PHP & MySQL Basics Why PHP as a web development language?
Introduction to PHP
What is PHP?
- PHP is a server-side scripting language, like ASP
- PHP scripts are executed on the server
- PHP supports many databases (MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL,Generic ODBC, etc.)
- PHP is an open source software
- PHP is free to download and use
What is a PHP File?
- PHP files can contain text, HTML tags and scripts
- PHP files are returned to the browser as plain HTML
- PHP files have a file extension of “.php”, “.php3”, or “.phtml”
What is MySQL?
- MySQL is a database server
- MySQL is ideal for both small and large applications
- MySQL supports standard SQL
- MySQL compiles on a number of platforms
- MySQL is free to download and use
Some PHP History & Background
PHP was created by Rasmus Lerdorf in 1994. It started as a collection of Unix-specific HTTP server modules, or tools, designed to assist in the maintenance of a small Web site. It is a language that has evolved considerably since its inception.
The original version of PHP was designed primarily to handle usage logging and server-side form generation. It was not a scripting language, just a set of server tools to help Mr. Lerdorf with Web site maintenance. Finding these tools to be useful, in June of 1995 he posted information on the modules to UseNET for others who might be interested in them.
PHP 2 went beyond logging utilities and became what Mr. Lerdorf himself called a “Server-side Embedded Scripting Language”. This shift was in response to market demand. People didn’t want to have to create writing new C-modules every time they had to do something new. Instead they wanted to be able to embed the logic directly into their Web pages.
PHP + MySQL
Why PHP?
- PHP runs on different platforms (Windows, Linux, Unix, etc.)
- PHP is compatible with almost all servers used today (Apache, IIS, etc.)
- PHP is FREE to download from the official PHP resource:www.php.net
- PHP is easy to learn and runs efficiently on the server side
PHP advantages
- PHP offers a lot of security mechanisms,
- Its easy connectivity abilities make it a popular choice of modular programming.
- It can easily be interfaced with a variety of libraries, xml’s.
- Its an open source software.
- Syntax is similar to C and C++ and hence easy to remember the syntax.
- Easy to use for creating dynamic web pages.
- PHP has its own community where people can make their own scripts and post as per the requirement.