Undefined variable?

I’m getting
Notice : Undefined variable: conn in C:\Users\lurtnowski\webserver\htdocs\DCT\2\reports\added_deviices.php on line 17
on

$result = mysqli_query($conn, $query);

But when I

echo '<pre>';
print_r(get_defined_vars());
echo '</pre>';

Its there.


Why is it undefined?

my bad, i had the connection string outside the function

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.