Tutorial 1: Introduction to PHP and MySQL Database

 

In this part, you will be introduced to PHP, MySQL, and the interaction of the two.

 

WHAT IS PHP?

PHP stands for PHP: Hypertext Preprocessor. It is a server-side scripting language, which can be embedded in HTML or used as a standalone binary (although the former use is much more common). PHP is a powerful tool for making dynamic and interactive Web pages and is the widely-used, free, and efficient alternative to competitors such as Microsoft's ASP.

 

Below are some basic general facts about PHP:

 

§  PHP is a server-side scripting language and its scripts are executed on the server.

§  PHP is an open source software and is free to download and use.

§  PHP files have “.php” extension. These files can hold text, HTML tags and scripts.

§  PHP files are returned to the browser as plain HTML.

§  PHP supports many databases (MySQL, Oracle, PostgreSQL, Sybase, Informix, Solid, Generic ODBC, etc.)

§  PHP is easy to learn.

 

WHAT IS MYSQL?

MySQL (pronounced My Ess Q El) is a Relational Database Management System (RDBMS). It is used to store data. Data in MySQL is stored in objects called tables. For example, a database of a company can have the following tables:

 

§  Customers

§  Vendors

§  Products

§  Orders

§  Contact

 

A table consists of rows and columns and holds related records. For instance, the Contact table holds feedback data from customers as shown below:

 

ID

Name

Email

Age

Message

1

Saad Muavia

saad@abc.com

30

This is feedback message # 1

2

Daniel Clarke    

daniel@gmail.com

25

This is feedback message # 2

3

Michael Peter   

mpeter@yahoo.com

40

This is feedback message # 3

4

Michael Jackson

mjackson@hotmail.com

55

This is feedback message # 4

 

This table (Contact) consists of five columns (ID, Name, Email, Age, and Message) and contains four records (rows 1 through 4). Each row holds same type of record with unique IDs and different values.


Next


Comments