I have a question that has brought me various incompatibilities. With the evolution of PHP and Mysql, more recent versions have appeared, this way the Mysqli. This is where my problem resides, I would like to know which is the correct way to connect.
With Mysql it was:
$con = mysql_connect("localhost","root","");
What about Mysqli?
$mysqli = new mysqli("localhost","root","","nome-tabela");
or
$mysqli = mysqli_connect("localhost","root","");
When I look at the PHP manual, it's a more object-oriented approach, but I've never seen it this way.