What are the common mistakes to avoid when transitioning from mysql to mysqli in PHP?

One common mistake to avoid when transitioning from mysql to mysqli in PHP is not updating the connection and query functions to use mysqli syntax. Make sure to replace all mysql functions with their mysqli equivalents to ensure compatibility with the newer mysqli extension.

// Incorrect usage of mysql_connect
$connection = mysql_connect('localhost', 'username', 'password');

// Correct usage of mysqli_connect
$connection = mysqli_connect('localhost', 'username', 'password');