The first thing we need to look at is that MySQL is a resource and MySQLi is an object. To migrate our code, we really do not need to understand the technical difference, however we must understand that they are different. The first thing we usually do with MySQL is to connect to and select a database, so let's take a look at mysql_connect and mysql_select_db. $connection = mysql_connect( 'host', 'username', 'password', new_link,flags); $database = mysql_select_db( 'database', $link); $connection is a MySQL link identifier to the resource and $database is just a boolean variable that will contain true on success or false on failure. In most situations your host will be localhost and you will only have supplied your username and password. mysqli_connect in PHP Now let's take a look at its counter-part in MySQLi, mysqli_connect. $connection = mysqli_connect( 'host', 'username', 'password', 'database', 'port',...