Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [MySQL][PHP]Usunięcie rekordu
--Tomick--
post
Post #1





Goście







Gdzie tkwi błąd:

  1. <form action="usun.php" method="post" enctype="multipart/form-data">
  2. <input class="none" name="autor" value="'.$user_data['user_name'].'" >
  3. <input class="none" name="id" value="'.$row[0].'">
  4. <input type="submit" value="- Usuń" class="button"></form>


usun.php

  1. <?php
  2. include("connect.php");
  3.  
  4. if($_SERVER['REQUEST_METHOD'] == 'POST')
  5. {
  6. $query = "DELETE from tresc WHERE autor = '".$_POST['autor']."' AND id = '".$_POST['id']."'";
  7. }
  8. header ("Location: tresc.php");
  9. ?>


W ogóle mi nie usuwa rekordow z bazy
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 20.08.2025 - 17:42