Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [MySQL][PHP]Dodawanie rekordów do bazy
--help--
post
Post #1





Goście







Witam !

Mam problem z usuwaniem elementów z bazy.

Mam plik admin.php. A w nim switcha:

To są podstrony /admin.php?cmd=ustawienia itp.

  1. switch($cmd)
  2. {
  3. case'ustawienia':
  4. include 'include/ustawienia.php';
  5. break;
  6.  
  7. case'user':
  8. include 'include/user.php';
  9. break;
  10.  
  11. case 'system':
  12. include 'include/system.php';
  13. }


Chce w pliku system.php stworzyć usuwanie rekordów z bazy.
Mam kod taki:

  1. <?php
  2. if(isset($_GET['akcja'])){
  3. switch($_GET['akcja']){
  4. case 'usun':
  5.  
  6. mysql_query('delete from rekrutacja where id='.$_GET['id'].' limit 1');
  7. header("Location: system.php");
  8.  
  9. break;
  10. ?>
  11.  
  12. <a href='system.php?akcja=usun&id=".$f['id']."'><b>USUŃ</b>


Jak mam w podstronie zrobić usuwanie rekordów ?

Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Aktualny czas: 29.09.2025 - 04:12