Pourriez-vous me dire pourquoi la variable "formSupp" ne remplit pas sa fonction, c'est à dire, supprimer un compte.
Voici, le code php :
et voici le code html :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 $formSupp = $this->createFormBuilder() ->getForm(); $formSupp->handleRequest($request); if($formSupp->isSubmitted()) { $em->remove($t_authentification); $em->flush(); return $this->redirectToRoute('compte'); }
Merci de votre aide.
Code html : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 <div class="row"> {{ form_start(formSupp) }} <button type="submit" class="btn btn-secondary" style="margin-left:80px;margin-bottom:15px"><i class="fas fa-check-circle"></i>OUI</button> {{ form_end(formSupp) }} <button class="btn btn-secondary" onclick="AbortDelete('{{t_authentification.id}}');" style="margin-left:10px;margin-bottom:15px"><i class="fas fa-times-circle"></i>NON</button> </div>
Partager