Geek Culture
Published in

Geek Culture

PHP Tutorial: Connecting to a database

Photo by benofthenorth on Unsplash

PHP has three ways to connect to MySQL databases. These are called database APIs. There is a procedural version (mysqli_*) using simple functions. There are two object-oriented versions (MySQLi, PHP Data Objects (PDO)) which use classes. They are similar and return the same results.

The procedural version is often a better choice for beginners who may not know object-oriented programming yet…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Yassine Himite

Yassine Himite

35 Followers

You don’t need to be a genius or a visionary, or even a college graduate for that matter, to be successful. You just need a framework and a dream.