Skip to content
Snippets Groups Projects
Commit 662f8470 authored by Boris's avatar Boris
Browse files

suppression avec post

parent 152e0cbc
Branches
No related tags found
No related merge requests found
Showing with 7 additions and 6 deletions
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
...@@ -11,9 +11,10 @@ ...@@ -11,9 +11,10 @@
</ul> </ul>
<form method="get" action="profs/delete"> <form method="post" action="profs/delete">
<label for="id">id</label>
<input name="id"> <input name="id">
<button type="submit">Envoyer</button> <button type="submit" placeholder="Supprimer...">Envoyer</button>
</form> </form>
</body> </body>
......
No preview for this file type
...@@ -36,8 +36,7 @@ public class StartServer { ...@@ -36,8 +36,7 @@ public class StartServer {
return ProfGUI.getAllProfs(); return ProfGUI.getAllProfs();
}); });
get("/profs/delete",(req,res) -> { post("/profs/delete",(req,res) -> {
ProfGUI.delete(req.queryParams("id")); ProfGUI.delete(req.queryParams("id"));
res.redirect("/profs"); res.redirect("/profs");
return null; return null;
......
...@@ -11,9 +11,10 @@ ...@@ -11,9 +11,10 @@
</ul> </ul>
<form method="get" action="profs/delete"> <form method="post" action="profs/delete">
<label for="id">id</label>
<input name="id"> <input name="id">
<button type="submit">Envoyer</button> <button type="submit" placeholder="Supprimer...">Envoyer</button>
</form> </form>
</body> </body>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment