Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Closed TopicStart new topic
> [PHP] Notice: Undefined index:
szczabik
post 5.10.2008, 19:43:40
Post #1





Grupa: Zarejestrowani
Postów: 226
Pomógł: 1
Dołączył: 13.05.2008

Ostrzeżenie: (0%)
-----


Witam na moje stronie pojawia się błąd



Notice: Undefined index: edit in /home/accounts_a/aide/public_html/infusions/quiz/quiz.php on line 28



W lini 28 mam taki kod

  1. <?php
  2. if (isset($_GET['del']) || ($_GET['edit'])) {
  3. ?>


wie ktoś co może powodować ten błąd
Go to the top of the page
+Quote Post
melkorm
post 5.10.2008, 19:45:01
Post #2





Grupa: Zarejestrowani
Postów: 1 366
Pomógł: 261
Dołączył: 23.09.2008
Skąd: Bydgoszcz

Ostrzeżenie: (0%)
-----


  1. <?php
  2. if (isset($_GET['del']) || isset($_GET['edit']))
  3. ?>

chyba tak powinno być ;]


--------------------
Go to the top of the page
+Quote Post
szczabik
post 5.10.2008, 19:52:26
Post #3





Grupa: Zarejestrowani
Postów: 226
Pomógł: 1
Dołączył: 13.05.2008

Ostrzeżenie: (0%)
-----


Dzięki działa ale mam jeszcze jeden problem wyskakuje taki błąd

Notice: Undefined index: f in /home/accounts_a/aide/public_html/test.php on line 26

Notice: Undefined index: wyniki in /home/accounts_a/aide/public_html/test.php on line 27

I tam mam taki kod

  1. <?php
  2. $f = $_POST["f"];
  3. $wyniki = $_POST["wyniki"];
  4. ?>


Oraz taki błąd

Notice: Undefined variable: pytania in /home/accounts_a/aide/public_html/test.php on line 45

I tam mam taki kod

  1. <?php
  2. $ile = count($pytania);
  3. ?>


Ten post edytował szczabik 5.10.2008, 19:53:47
Go to the top of the page
+Quote Post
melkorm
post 5.10.2008, 19:56:47
Post #4





Grupa: Zarejestrowani
Postów: 1 366
Pomógł: 261
Dołączył: 23.09.2008
Skąd: Bydgoszcz

Ostrzeżenie: (0%)
-----


tych zmiennych poprostu nie ma ... i to jest błąd. możesz dawać warunki na isset lub je pre-definiować jak w przyapdku pytań ... .


--------------------
Go to the top of the page
+Quote Post
szczabik
post 5.10.2008, 20:04:24
Post #5





Grupa: Zarejestrowani
Postów: 226
Pomógł: 1
Dołączył: 13.05.2008

Ostrzeżenie: (0%)
-----


Mam jeszcze jeden błąd
Notice: Undefined variable: pytania in /home/accounts_a/aide/public_html/test.php on line 52

I w lini tej mam taki kod
  1. <?php
  2. $ile = count($pytania);
  3. ?>


Ten post edytował szczabik 5.10.2008, 20:14:04
Go to the top of the page
+Quote Post
melkorm
post 5.10.2008, 20:17:29
Post #6





Grupa: Zarejestrowani
Postów: 1 366
Pomógł: 261
Dołączył: 23.09.2008
Skąd: Bydgoszcz

Ostrzeżenie: (0%)
-----


daj wyżej $pytania = array();

no ale to hm bezsens? :] No ale errora nie będzie smile.gif


--------------------
Go to the top of the page
+Quote Post
Cysiaczek
post 5.10.2008, 22:06:52
Post #7





Grupa: Moderatorzy
Postów: 4 465
Pomógł: 137
Dołączył: 26.03.2004
Skąd: Gorzów Wlkp.




@Szczabik - mógłbyś sobie to darować. Po jednym przykładzie powinieneś rozumieć na czym polega błąd.

Zamykam.


--------------------
To think for yourself you must question authority and
learn how to put yourself in a state of vulnerable, open-mindedness;
chaotic, confused, vulnerability, to inform yourself.
Think for yourself. Question authority.
Go to the top of the page
+Quote Post

Closed TopicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 25.04.2024 - 04:33