<?php
include "classes/class.loader.php";
$html = new html();
$html->bacground_emoji();
$calls = new functions();
$db = new db();
$service_res = $db->query("SELECT * FROM services WHERE record_id = " . $_GET['record_id']);
$services = $service_res->fetch_assoc();
$html->header();

?>
<style>
    body {
        background-color: #bebebee7;
        color: white;
    }
</style>



<div class="home_container">
    
    <div class="data_container_for_adding">
        <div class="data_row">
            <form action="update_service.php" method="post" id="news_form" class="form_class">
                <label>NAME</label>
                <input type="text" id="record_id" name="record_id" hidden value="<?php echo $services['record_id']; ?>">
                <input type="text" id="name" name="name" value="<?php echo $services['name']; ?>">
                <br>
                <label>DESCRIPTION</label>
                <textarea id="description" name="description"
                    rows="10"><?php echo $services['description']; ?></textarea>
                <br>
                <label>PRICE</label>
                <input type="text" id="price" name="price" value="<?php echo $services['price']; ?>">
                <br><br>
                <button type="submit">Update</button>
            </form>
            <form action="delete_service.php" method="post" id="news_form">
                <input type="text" id="record_id" name="record_id" hidden value="<?php echo $services['record_id']; ?>">
                <button type="submit">DELETE</button>
            </form>
        </div>
    </div>
</div>

<?php $html->html_end(); ?>