PHP and MySQL
Why use PHP?
You have obviously heard of a number of programming languages out there; you may be wondering why we would want to use PHP as our poison for the web programming. Below are some of the compelling reasons.
- Bulleted List Item
- Bulleted List Item
- PHP is open source and free.
- Short learning curve compared to other languages such as JSP, ASP etc.
- Large community document
- Most web hosting servers support PHP by default unlike other languages such as ASP that need IIS. This makes PHP a cost effective choice.
- PHP is regular updated to keep abreast with the latest technology trends.
- Other benefit that you get with PHP is that it’s a server side scripting language; this means you only need to install it on the server and client computers requesting for resources from the server do not need to have PHP installed; only a web browser would be enough.
- PHP has in built support for working hand in hand with MySQL; this doesn’t mean you can’t use PHP with other database management systems. You can still use PHP with
- MS SQL Server
- ODBC etc.
- PHP is cross platform; this means you can deploy your application on a number of different operating systems such as windows, Linux, Mac OS etc.
Common uses of PHP
- PHP performs system functions, i.e. from files on a system it can create, open, read, write, and close them.
- PHP can handle forms, i.e. gather data from files, save data to a file, through email you can send data, return data to the user.
- You add, delete, modify elements within your database through PHP.
- Access cookies variables and set cookies.
- Using PHP, you can restrict users to access some pages of your website.
- It can encrypt data.
Characteristics of PHP
Five important characteristics make PHP’s practical nature possible −
You will also learn
- Connecting to MySQL database − Learn how to use PHP to open and close a MySQL database connection.
- Create MySQL Database Using PHP − This part explains how to create MySQL database and tables using PHP.
- Delete MySQL Database Using PHP − This part explains how to delete MySQL database and tables using PHP.
- Insert Data To MySQL Database − Once you have created your database and tables then you would like to insert your data into created tables. This session will take you through real example on data insert.
- Retrieve Data From MySQL Database − Learn how to fetch records from MySQL database using PHP.
- Using Paging through PHP − This one explains how to show your query result into multiple pages and how to create the navigation link.
- Updating Data Into MySQL Database − This part explains how to update existing records into MySQL database using PHP.
- Deleting Data From MySQL Database − This part explains how to delete or purge existing records from MySQL database using PHP.
- Using PHP To Backup MySQL Database − Learn different ways to take backup of your MySQL database for safety purpose.