diff --git a/dashboard.php b/dashboard.php index 73424cd..680f690 100644 --- a/dashboard.php +++ b/dashboard.php @@ -76,7 +76,7 @@ function getStatusBadgeClass($status) { Dashboard @@ -85,7 +85,7 @@ function getStatusBadgeClass($status) {

Expense Reports

- Submit New Expense + Submit New Expense
diff --git a/submit_expense.php b/submit_expense.php new file mode 100644 index 0000000..7d04623 --- /dev/null +++ b/submit_expense.php @@ -0,0 +1,133 @@ +prepare( + 'INSERT INTO expense_reports (agent_name, amount, description, status) VALUES (?, ?, ?, ?)' + ); + $stmt->execute([$agent_name, $amount, $description, 'Pending']); + $success_message = 'Expense report submitted successfully!'; + } catch (PDOException $e) { + // In a real app, you would log this error, not show it to the user. + $error_message = 'Database error: Could not submit the report.'; + } + } +} +?> + + + + + + Submit Expense Report + + + + + +
+

Submit New Expense Report

+ + + + + + +
+ +
+ + + +
+
+
+ + +
+
+ + +
+
+ + +
+
+
+ +
+
+ +
+ +