$bd= new DB();
$conectar = $bd->conectar();
function extFolio($folio)
{
$query = "select FolioParticipanteCG from participantes where FolioParticipanteCG = '".$folio."'";
$folio=mysqli_query($conectar,$query)or die("Error al seleccionar folio".mysqli_error());//En esta linea es donde me genera el error
$folio=mysqli_num_rows($folio);
return $folio;
}
This is the error Undefined variable: connect I'm new to php so I think it's because the connect variable I need to instantiate within the function but I would like to use it globally and that same function is in another php file which is called clas_conex.class.php but I do not see the problem anymore What do I do? I would appreciate your help or any opinion.