<?php include "../../root.class.php";
$html = new html();
$html->add_styles_page();
$table_name = "item_categories";
$db_safeguard = new db_safeguard();
?>

<div class="form_down">
    <h1>EDIT ITEM CATEGORIE</h1>
    <?php

    echo $html->input_html_from_db($table_name, 'name', "`record_id` = {$_GET['record_id']}", 'name', 'name', 'name')
        ?>
    <?php
    echo $html->input_html("", $_SESSION['restorant_id'], "restorant_id", "restorant_id");

    echo $html->input_html("record_id", $_GET['record_id'], "record_id", "record_id", '', '', '', '', 'hidden');

    echo $html->submit_btn("submit", 'SAVE', "edit_$table_name()");

    ?>

</div>

<?php
$html->html_form_ajax("edit_$table_name", "UPDATE", $table_name, "record_id = {$_GET['record_id']}", false);
?>