The mysql extension has been marked as deprecated as of php 5.5.0 and will be removed completely in a future version. It is old and not very user friendly. This article will introduce PDO as a replacement. Connecting to a Database Connecting with mysql_connect The mysql_connect function returns a MySQL link identifier if the database connection was successful or FALSE if the connection was not successful.
After connecting to the database server the database must be selected before any queries…