0
I have a small problem trying to use 1 variable that comes from another php file. Ex: I have a connection file where I have all the data on the database, but in the insert file I need to use one of the variables of the connection file in the function mysqli(); how do I use this variable in other files as a 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;
}
?>
I tried it this way but I still can’t, I’ll send the code.
– user48260
I’ve already changed your code.
– Pedro Luzio
I’ve already changed your code.
– Pedro Luzio
Obg Peter, I was watching and noticed that the mistake was silly, I was not connecting and not even choosing the bank. I think the sleep started to disturb, rs !
– user48260