<?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'] . "' 
,`prefix_on_value` = '" . $_POST['prefix_on_value'] . "',
`postfix_on_value` = '" . $_POST['postfix_on_value'] . "',
`number_format` = '" . $_POST['number_format'] . "',
`searchable` = '" . $_POST['searchable'] . "',
`number_format_decimal` = '" . $_POST['number_format_decimal'] . "'
WHERE `record_id` = '" . $_POST['record_id'] . "'");
if ($res) {
    header("location:home.php");
}