Hello friends, today we will learn how to connect to MySQL database with PHP. This tutorial will require a MySQL database and a web development environment using mysql, apache and php and a simple text editor. The tutorial takes you through establishing a MySQL connection using php on a web page, connecting to a MySQL table and retrieving the results and displaying them back on the web page. Earlier versions of PHP used the MySQL extension.However, this extension was depreciated in 2012. Later can work with MySQL database using MySQLi extension (the "i" stands for improved) PDO (PHP Data Objects) The main difference between these two are if you want to switch your project to another database PDO makes it easy(since it can connect 12 different databases). You only have to change the connection string and a few queries. With MySQLi, you will need to rewrite the entire code - queries included.In this t...
This blog is about solutions for PHP,Python,JavaScript,j query,HTML,CSS and Ubuntu.

Comments
Post a Comment