Form wont add new product to database PHP

Im attempting to make a form that adds a new product to my database, I have a function that has and SQL insert statement, I call it in my add new product page but when the form is submitted nothing gets added to my database and I cant understand why. I know that the code is not secure or safe the site wont be going live.

the function is stored in a separate file but is included require('includes/application_top.php');

this is the add_product function :

function add_product($conn, $details, $name, $images, $price) {
    $sql = "INSERT INTO products (prod_Details, prod_Price, prod_Name, images) VALUES ('" . mysqli_real_escape_string($conn, $details) . "','" . mysqli_real_escape_string($conn, $name) . "','" . mysqli_real_escape_string($conn, $images) . "'," . (float) $price . ")";
    mysqli_query($conn, $sql);
}

and this is the add products page that has the form on it.

<?php
require('includes/application_top.php');
$page_title='Manage Products';
$err = '';
$message = '';
if (isset($_FILES['image_file'])) {
    $file_details = $_FILES['image_file'];
    $mime_type = $file_details['type'];
    $orig_filename = $file_details['name'];
    $size = $file_details['size'];
    if ($mime_type == 'image/png') {
        $message .= 'The file ' . htmlspecialchars($orig_filename) . ' is of size ' . (int) $size . ' bytes';
        $save_folder = $_SERVER['DOCUMENT_ROOT'] . '/../private/uploads/';
        $save_file = $save_folder . 'upload.txt';
        if (move_uploaded_file($file_details['tmp_name'], $save_file)) {
            if ( ! file_exists($save_file)) {
                $err .= 'The file ' . $save_file . ' does not exist';
            } else {
                $contents = file_get_contents($save_file);
                $message .= '<br/><br/>' . nl2br(htmlspecialchars($contents));
                unlink($save_file);
            }
        } else {
            $err .= 'Error moving file';
        }
    } else {
        $err = 'The file must be a .png image';
    }
}
echo $err;
echo $message;
$product_id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0;
$action = $_REQUEST['action'] ?? '';
if ($action == "save_add") {
    // Normally validation would be done here
    $name = $_POST['name'];
    $price = $_POST['price'];
    $images = $_FILES['image_file'];
    $details = $_POST['description'];
    add_product($freshKickz_conn, $details, $name, $images, $price);
    // Normally we would check it worked and display a success or error message
}
require('includes/site_header.php');

?>
<br>
<br>
<br>
<h2>New Product</h2>
        <form id="demo_form" method="post" enctype="multipart/form-data" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"class="form-horizontal">
            <div class="form-group">
                <label class="col-sm-3 control-label" for="name">Name</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control" id="name" name="name" placeholder="Product name" value="" maxlength="255" />
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label" for="price">Price</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control" id="price" name="price" placeholder="Product price" value="" maxlength="16" />
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label" for="description">Description</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control" id="description" name="description" placeholder="Product Description" value="" />
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label" for="bigimg">Larger Image</label>
                <input type="file" class="form-control" id="image_file" name="image_file" />
            </div>
        <div class="col-sm-9">
            <label class="col-sm-3 control-label" for="bigimg">Submit Product</label>
                    <input type="hidden" name="action" value="save_add" />
                    <input type="submit" class="btn btn-primary" name="action" value="Upload File" />
            </div>
        </form>
        <?php print_r($_FILES) ?>
<?php
require('includes/application_bottom.php');
require('includes/site_footer.php');
?>