Answer the question
In order to leave comments, you need to log in
Why does the code stop working after connecting the PHP MySQLi class?
The bottom line is, there are two php files.
Contents of the first first.php file: include_once('class/second.php');
Contents of the second second.php :
include_once ('../lib/MysqliDb.php');
$db = new MysqliDb ('host', 'username', 'password', 'databaseName');
$data = Array ("content" => "text");
$id = $db->insert('Feedback', $data);
if($id)
echo 'Фидбек записан с id '.$id;
Answer the question
In order to leave comments, you need to log in
new MysqliDb ('', '', '', ''););
doesn't bother you?
and include errors if such cases
ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
Do not underuse this class. It was written by an idiot.
There are TWO fatal errors in this one line at once.
plus there is no normal mysql error handling.
OMG
$this->_mysqli = new mysqli ($this->host, $this->username, $this->password, $this->db, $this->port)
or die('There was a problem connecting to the database');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question