0% found this document useful (0 votes)
4 views

User - Js Change

Uploaded by

hspandit071
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

User - Js Change

Uploaded by

hspandit071
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

<!

DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Users</title>
<style>
table, tr, th, td {
border: 1px solid purple;
text-align: center;
}
</style>
</head>
<body>
<form method="GET" action="/user/new">
<button>Add New User</button>
</form>
<h2>List of all users</h2>
<table>
<tr>
<th>Id</th>
<th>Email</th>
<th>Username</th>
<th>Actions</th>
</tr>
<% for (user of data) { %>
<tr>
<td><%= user.id %></td>
<td><%= user.email %></td>
<td><%= user.username %></td>
<td>
<form method="GET" action="/user/<%= user.id %>/edit">
<button>Edit username</button>
</form>
<form method="POST" action="/user/<%= user.id %>?_method=DELETE">
<input type="password" name="password" placeholder="Enter password to
delete" required />
<button>Delete</button>
</form>
</td>
</tr>
<% } %>
</table>
</body>
</html>

You might also like