<?php

include $_SERVER['DOCUMENT_ROOT'] . '/classes/autoload.php';


$res = $db->query("default_links", "UPDATE `default_links` SET 
`parent_table_name` = '" . $_POST['parent_table_name'] . "', 
`parent_table_column` = '" . $_POST['parent_table_column'] . "', 
`child_table_name` = '" . $_POST['child_table_name'] . "', 
`pull_column_name` = '" . $_POST['pull_column_name'] . "', 
`function` = '" . $_POST['function'] . "', 
`display_method` = '" . $_POST['display_method'] . "', 
`icon` = '" . $_POST['icon'] . "', 
`onclick` = '" . $_POST['onclick'] . "', 
`onclick_file` = '" . $_POST['onclick_file'] . "', 
`send_column` = '" . $_POST['send_column'] . "', 
`custom_header` = '" . $_POST['custom_header'] . "', 
`custom_text` = '" . $_POST['custom_text'] . "' 
WHERE `record_id` = '" . $_POST['record_id'] . "'");
if ($res) {
    header("location:home.php");
}