Such a question, the query does not work in this way $mysqli->query("...");
, instead you have to use mysql_query("...");
Here is the whole code:
function settings() { $data = array('nameproject' => 'name', 'titleproject' => 'title', 'emailadmin' => 'email', 'minlogin' => 'minlogin', 'maxlogin' => 'maxlogin', 'minwithdraw' => 'minsum', 'maxwithdraw' => 'maxsum', 'refpercent' => 'refpercent', 'exchange' => 'exchange', 'a1' => 'auth', 'r1' => 'reg', 'https' => 'https', 'stopwork' => 'stopwork' ); foreach ($data as $key => $value) { if (!empty($_POST[$key])) { mysql_query("UPDATE settings SET ".$value." = '".$_POST[$key]."'"); // вот и проблемное место, почему не работает $mysqli->query("..."); ? } else { mysql_query("UPDATE settings SET ".$value." = ''"); } } }
mysqli_query( $query )
. - Arnial