$return = "shelves"; } else { if ($index_a[1] == "setting") { $tbl = "lib_Settings"; $return = "users"; } } } } } } if (isset($tbl)) { require 'modify.class.php'; $mod = new Modify(); if ($tbl == "lib_RFID") { $update = $mod->update($tbl, array("RFID", $_POST['original']), array('RFID' => $_POST['new'], '_shelfID' => $_POST['_shelfID'])); } else { $update = $mod->update($tbl, array($index_a[1] . 'ID', $index_a[2]), $_POST); } if ($update === true) { header("Location: " . URL_ROOT . "info/" . $return . "/" . $index_a[3]); echo "Vellykket."; } else { echo "Feilet<br>" . $mod->error; } } else { echo "Mangler obligatorisk variabel."; } } else { echo "Mangler obligatorisk variabel."; }