prepare("INSERT INTO `item_master` (`item_name`, `unit`, `hsn`, `cgst`, `sgst`, `igst`, `description`, `created_at`) VALUES (?, ?, ?, ?, ?, ?, ?, ?)"); if ($stmt) { // Bind parameters: s = string, s = string, s = string $stmt->bind_param("ssssssss", $item_name, $unit, $hsn, $cgst, $sgst, $igst, $description, $created_at); // Execute the statement if ($stmt->execute()) { echo ""; // Optionally redirect or clear form here } else { echo "Error executing query: " . $stmt->error; } $stmt->close(); } else { echo "Failed to prepare statement: " . $conn->error; } } require_once('includes/header.php'); ?>

Item Dashboard

Item's Inventory
query($query); $index = 1; // Initialize row index if ($result && $result->num_rows > 0) { while ($row = $result->fetch_assoc()) { // Determine status label and badge class // $statusLabel = ($row['status'] == 1) ? 'Active' : 'Deactive'; // $badgeClass = ($row['status'] == 1) ? 'bg-success' : 'bg-danger'; // echo ""; } } else { echo ''; } ?>
ID Item Name Unit HSN Code CGST(%) SGST(%) IGST(%) Special Note Actions
{$statusLabel}
" . $index++ . " " . htmlspecialchars($row['item_name']) . " " . htmlspecialchars($row['unit']) . " " . htmlspecialchars($row['hsn']) . " " . htmlspecialchars($row['cgst']) . " " . htmlspecialchars($row['sgst']) . " " . htmlspecialchars($row['igst']) . " " . (!empty($row['description']) ? htmlspecialchars($row['description']) : 'N/A') . "
No records found.