You are on page 1of 2

<!

DOCTYPE html>
<html>
<head>
<title>Expense Tracker</title>
</head>
<body>
<h1>Expense Tracker</h1>
<form action="register.php" method="POST">
<label for="username">Username:</label>
<input type="text" name="username" required>
<label for="password">Password:</label>
<input type="password" name="password" required>
<button type="submit">Register</button>
</form>
<hr>
<form action="login.php" method="POST">
<label for="username">Username:</label>
<input type="text" name="username" required>
<label for="password">Password:</label>
<input type="password" name="password" required>
<button type="submit">Login</button>
</form>
<hr>
<h2>Expenses</h2>
<table>
<thead>
<tr>
<th>Date</th>
<th>Description</th>
<th>Amount</th>
<th>Payment Method</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>01/01/2022</td>
<td>Groceries</td>
<td>$50.00</td>
<td>Cash</td>
<td><a href="delete.php?id=1">Delete</a></td>
</tr>
<tr>
<td>01/02/2022</td>
<td>Gas</td>
<td>$30.00</td>
<td>Credit Card</td>
<td><a href="delete.php?id=2">Delete</a></td>
</tr>
</tbody>
</table>
<hr>
<form action="add.php" method="POST">
<label for="date">Date:</label>
<input type="date" name="date" required>
<label for="description">Description:</label>
<input type="text" name="description" required>
<label for="amount">Amount:</label>
<input type="number" name="amount" step="0.01" required>
<label for="payment-method">Payment Method:</label>
<select name="payment-method" required>
<option value="cash">Cash</option>
<option value="check">Check</option>
<option value="debit-card">Debit Card</option>
<option value="credit-card">Credit Card</option>
</select>
<button type="submit">Add Expense</button>
</form>
<hr>
<h2>Statistics</h2>
<ul>
<li>Total Expenses: $80.00</li>
<li>Average Expenses per Day: $40.00</li>
<li>Expenses by Payment Method:</li>
<ul>
<li>Cash: $50.00</li>
<li>Credit Card: $30.00</li>
</ul>
</ul>
<hr>
<form action="logout.php" method="POST">
<button type="submit">Logout</button>
</form>
</body>
</html>

You might also like