What are the potential issues with using the mysql_* functions in PHP, and why is it recommended to switch to mysqli_* functions?

The potential issues with using the mysql_* functions in PHP include security vulnerabilities, lack of support for newer MySQL features, and deprecated status in PHP versions 5.5 and above. It is recommended to switch to mysqli_* functions as they offer improved security through prepared statements, support for stored procedures, and compatibility with the latest MySQL versions.

// Using mysqli_* functions to connect to MySQL database
$mysqli = new mysqli("localhost", "username", "password", "database");

if ($mysqli->connect_error) {
    die("Connection failed: " . $mysqli->connect_error);
}