Hello I am pretty sure they are in the same scope and am unsure why I am getting this error now as it was working before.
These are the other files in the same folder as the php file :
dbh.php recipeLookUp.php
It is line 9 that I am getting the error this is the recipeLookUp.php
<?php
    function lookup($sql,$column_name){
        $results_search=array();
        include_once 'dbh.php';
        $results=mysqli_query($conn,$sql);
        $resultsCheck = mysqli_num_rows($results);
        if ($resultsCheck > 0) {
            while ($row = mysqli_fetch_assoc($results)){
                $info= $row[$column_name];
                $results_search[]=$info;
            }
            return $results_search;
        }
    }
and here is my other file
<?php
$dbServername = 'localhost';
$dbUsername = 'root';
$dbPassword = '';
$dbName = 'Recipe';
$conn = mysqli_connect($dbServername,$dbUsername,$dbPassword,$dbName);
Im sure it probaly something small but I can't find it please help!!!
 
    