Ciao a tutti..ho un problemino che mi sta facendo impazzire...uos una classe PHP per collegarmi ad un DB:
Codice PHP:
class Utils {
protected $host;
protected $userName;
protected $password;
protected $database;
function __construct() {
$this->host = 'localhost';
$this->userName = 'emulman_vallicom';
$this->password = 'vallicom';
$this->database = 'emulman_vallicom';
}
//********** DATABASE METHODS **********
public function recordExists($sql, $mode=1) {
$row = NULL;
// riga che mi da errore
$mysqli = new mysqli($this->host, $this->userName, $this->password, $this->database);
// eccetera
ora, quando cerco di memorizzare un record nel database ricevo semrpe questo errore:
Warning: mysqli::mysqli() [mysqli.mysqli]: (28000/1045): Access denied for user 'emulman_vallicom'@'localhost' (using password: YES) in /home/emulman/public_html/hotspot/class/utils.php on line 21
come mai? eppure username e password sono corretti, li ho creati da phpmyadmin...