Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] Problem z usuwaniem postu
marcin0077
post
Post #1





Grupa: Zarejestrowani
Postów: 94
Pomógł: 0
Dołączył: 18.10.2008

Ostrzeżenie: (10%)
X----


Witam

Mam problem z usuwaniem postu i nie wiem jak to zrobić aby działało

  1. <?php
  2. if(isset($_SESSION['upr']) && $_SESSION['upr'] == "A"){
  3. if(isset($_GET['page']) && $_GET['page'] == "delete" && isset($_GET['id'])){
  4. if(preg_match('/^([0-9]{1,})$/', $_GET['id'])){
  5. $id = $_GET['id'];
  6. $result = mysql_query("DELETE FROM argue WHERE id = '$id'");
  7.  
  8. header("Location: ../../page/1");
  9. }
  10. else header("Location: ../error403/");
  11. }
  12. else header("Location: ../error402/");
  13. }
  14. else header("Location: ../error401/");
  15.  
  16. ?>


Usuwanie z admina działa tylko z użytkownika nie
Przy próbie usuwanie ze zwykłego usera = error401
(upr = A - admin, upr = U - user)

Proszę o pomoc
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: 24.12.2025 - 15:26