Answer the question
In order to leave comments, you need to log in
How to connect to OOP DB?
I'm trying to do so
class connect{
public $db = mysqli_connect('localhost', 'root', 'amV5TbDYH8', 'News');
public function dbconnect($db){
if($db){
echo "ok";
} die (mysql_error());
}
}
public $db = mysqli_connect('localhost', 'root', 'amV5TbDYH8', 'News');
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question