Exemple #1
0
<?php

require '../model/class_connect_db.php';
require '../model/class_update.php';
if (isset($_POST['opt_name'], $_POST['opt_value'], $_POST['edit'])) {
    $name = $_POST['opt_name'];
    $value = $_POST['opt_value'];
    $edit = $_POST['edit'];
    //var_dump($edit);
    //return;
    $update = new Update();
    $result = $update->opt_update($name, $value, $edit);
    if ($result == true) {
        header("Location: ../pages/opt.php");
    } else {
        var_dump($result);
    }
}