<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Edit Product</title>
</head>
<body>
    <h2>Edit Product</h2>
    <form action="/products/edit/<%= product.id %>" method="POST" enctype="multipart/form-data">

        <label>Product ID:</label>
        <input type="text" name="product_id" value="<%= product.id %>" readonly>
        <br>

        <label>Product Name:</label>
        <input type="text" name="name" value="<%= product.name %>" required>
        <br>

        <label>Price:</label>
        <input type="number" name="price" value="<%= product.price %>" required>
        <br>

        <label>Stock Quantity:</label>
        <input type="number" name="stock" value="<%= product.stock %>" required>
        <br>

        <label>Product Description:</label>
        <textarea name="description" required><%= product.description %></textarea>
        <br>

        <label>Change Image (Upload a new one if needed):</label>
        <input type="file" name="image">
        <br>

        <button type="submit">Save Changes</button>
    </form>
</body>
</html>