Goodday,
I get an strange error.
this is my code:
<?php
$con=mysqli_connect("localhost","root","","testdatabase");
class database{
public function select($tableName){
$result = mysqli_query($con,"SELECT * FROM ".$tableName);
}
}
$database = new database();
?>
The error message is that $con is an undefined variable. But i define $con on line number 2?
when i var_dump con it also says NULL.
What am i doing wrong?