u
This commit is contained in:
@@ -100,7 +100,7 @@
|
|||||||
// Create settings table
|
// Create settings table
|
||||||
$sql = "CREATE TABLE IF NOT EXISTS settings (
|
$sql = "CREATE TABLE IF NOT EXISTS settings (
|
||||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||||
name VARCHAR(255) NOT NULL,
|
name VARCHAR(255) NOT NULL UNIQUE,
|
||||||
value VARCHAR(255) NOT NULL
|
value VARCHAR(255) NOT NULL
|
||||||
)";
|
)";
|
||||||
|
|
||||||
|
|||||||
@@ -39,8 +39,8 @@ function safe_settings(){
|
|||||||
$name=htmlspecialchars($_GET["update"]);
|
$name=htmlspecialchars($_GET["update"]);
|
||||||
//update what should be done if a virus is found
|
//update what should be done if a virus is found
|
||||||
if($_GET["update"]=="setting_virus_ctrl_virus_found_action"){
|
if($_GET["update"]=="setting_virus_ctrl_virus_found_action"){
|
||||||
//$stmt = $conn->prepare("INSERT INTO settings (name,value) VALUES (?,?) ON DUPLICATE KEY UPDATE value = ?;");
|
$stmt = $conn->prepare("INSERT INTO settings (name,value) VALUES (?,?) ON DUPLICATE KEY UPDATE value = ?;");
|
||||||
$stmt = $conn->prepare("UPDATE settings set value=? WHERE name='virus_ctrl:virus_found:action';");
|
//$stmt = $conn->prepare("UPDATE settings set value=? WHERE name='virus_ctrl:virus_found:action';");
|
||||||
$stmt->bind_param("s",$value);
|
$stmt->bind_param("s",$value);
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
$stmt->close();
|
$stmt->close();
|
||||||
|
|||||||
Reference in New Issue
Block a user