Category

PHP

MySQLi: Handling MySQL databases in PHP

PHP

MySQLi (MySQL Improved) is the new driver which is used to connect to MySQL databases exclusively in PHP. This improved extension has a lot of advantages over the old mysql_query statements. You can take advantages of the new functionality when you upgrade from mysql to mysqli. One of the major advantage you can get is the ability to use the…

Connecting to MySQL Databases using PDO in PHP

PHP

To connect to MySQL databases in PHP, the age old mysql_connect API is no longer used. It has been deprecated and will not be supported in future PHP versions. So, there are recommendations everywhere for us to use either PDO (PHP Data Object) or mysqli_connect. Using PDO (PHP Data Objects) PDO supports multiple database types. You can connect to different…

Detail Introduction to PHP Object Oriented Programming with Examples

PHP

About Object Oriented Programming Object oriented programming (OOP) was introduced in PHP 5. This new technique of programming allows us to define classes and create objects. The aim is to reduce rewriting of the same code again and again while increasing reusability of the available code. OOP also makes it simper to edit and update our code. OOP looks a…

File Operations in PHP – Create, Open, Read, Write and Update

PHP

In PHP, you can perform all types of file operations. You can open or create any type of file that you want. You can also read files, write to them or update their content. There are many other things that you can do like forcing a file download while opening it. For websites, files are used to store data. You…