Are there any alternative methods to mysql_connect() that allow for encrypted passwords?

When using the `mysql_connect()` function in PHP to connect to a MySQL database, passwords are sent in plain text, which can be a security risk. To encrypt passwords when connecting to a MySQL database, you can use the `mysqli_connect()` function instead, which supports encrypted passwords.

// Connect to MySQL database with encrypted password using mysqli_connect()
$servername = "localhost";
$username = "username";
$password = "password";
$dbname = "database";

$conn = mysqli_connect($servername, $username, $password, $dbname);

if (!$conn) {
    die("Connection failed: " . mysqli_connect_error());
}

echo "Connected successfully";