I have been told that this mode of connection is not secure, but I do not quite understand why it is not.
<?php
$conecta = mysql_connect("HOST", "LOGIN", "SENHA") or print (mysql_error());
print "Conexão OK!";
mysql_close($conecta);
?>
And what would be the fix to make a secure connection?