I'm having a little problem trying to use 1 variable that comes from another php file. Ex: I have a connection file where I have all the data about the database, but in the insert file I need to use one of the connection file variables in the mysqli () function; how do I use this variable in other files as an extend for example?
<?php
$server = "127.0.0.1";
$banco = "Crud";
$usuario = "root";
$senha = "";
$conexaoDB = mysqli_connect($server, $usuario, $senha);
$conexaoDB = mysqli_select_db($conexaoDB,"$banco");
if (!$conexaoDB) {
echo "Erro, não foi possível conectar-se ao banco de dados"; exit;
}
?>