Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Potrojne wyswietlanie
sylsaw
post 20.07.2005, 10:22:50
Post #1





Grupa: Zarejestrowani
Postów: 62
Pomógł: 0
Dołączył: 29.06.2005

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


mam taki problem, jest trzech uzytkownikow, i na dole kodu mam linki do innych podstron i na ekeranie wyswietlaja mi sie potrojnie , nie moge tego zlikwidowac


  1. <body LINK=\"black\" VLINK=\"black\" ALINK=\"blue\" bgcolor=\"#CCCCCC\" leftmargin=\"20\" topmargin=\"50\"> <font size=\"6\" face=\"'Comic Sans MS'\"><center><b>Podales zly login lub haslo</b></center></font>
  2. <?php
  3. $login[0]='x';
  4. $haslo[0]='x1;
  5. $login[1]='xx';
  6. $haslo[1]='x2';
  7. $login[2]='xxx';
  8. $haslo[2]='xxxx';
  9. for ($i=0;$i<3;$i++)
  10. if($login[$i]==$_POST[\"podany_login\"]&&$haslo[$i]==$_POST[\"podane_haslo\"]) {
  11. setcookie(\"log\", TRUE, time()+3600*24);
  12. header(\"location: edycja.html\");
  13. }
  14. else {
  15. //header(\"location: logowanie.html\");
  16. //echo (\"Podałes zły login lub hasło.\");
  17. echo '<FORM ACTION=&#092;"index.htm\">
  18. <P ALIGN=&#092;"right\"><INPUT TYPE=\"submit\" VALUE=\"Strona Główna\"></P></FORM>';
  19. echo '<FORM ACTION=\"logowanie.html\">
  20. <P ALIGN=\"right\"><INPUT TYPE=\"submit\" VALUE=\"Logowanie\"></P></FORM>';
  21.  
  22. }
  23. ?>
Go to the top of the page
+Quote Post
nospor
post 20.07.2005, 10:30:06
Post #2





Grupa: Moderatorzy
Postów: 36 557
Pomógł: 6315
Dołączył: 27.12.2004




no bo ty linki wyswietlasz gdy się login i haslo nie zgadza. jak sie zaden nie zgadza to sie 3 razy wyswietli. jaki kod taki wynik biggrin.gif

pozatym zjadles ciapka przy haslo[0]


--------------------

"Myśl, myśl, myśl..." - Kubuś Puchatek || "Manual, manual, manual..." - Kubuś Programista
"Szukaj, szukaj, szukaj..." - Kubuś Odkrywca || "Debuguj, debuguj, debuguj..." - Kubuś Developer

Go to the top of the page
+Quote Post
sylsaw
post 20.07.2005, 10:31:39
Post #3





Grupa: Zarejestrowani
Postów: 62
Pomógł: 0
Dołączył: 29.06.2005

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


a da sie zobic zeby sie tylko raz wyswietlalo , a jak tak to w jaki sposob
Go to the top of the page
+Quote Post
nospor
post 20.07.2005, 10:37:14
Post #4





Grupa: Moderatorzy
Postów: 36 557
Pomógł: 6315
Dołączył: 27.12.2004




postaraj się czasami samemu takie żeczy obejść. To uczy.

  1. <?php
  2.  
  3. for ($i=0;$i<3;$i++)
  4. if($login[$i]==$_POST[&#092;"podany_login\"]&&$haslo[$i]==$_POST[\"podane_haslo\"]) {
  5. setcookie(&#092;"log\", TRUE, time()+3600*24);
  6. header(&#092;"location: edycja.html\");
  7. }
  8. //header(\"location: logowanie.html\");
  9. //echo (\"Podałes zły login lub hasło.\");
  10. echo '<FORM ACTION=\"index.htm\">
  11. <P ALIGN=\"right\"><INPUT TYPE=\"submit\" VALUE=\"Strona Główna\"></P></FORM>';
  12. echo '<FORM ACTION=\"logowanie.html\">
  13. <P ALIGN=\"right\"><INPUT TYPE=\"submit\" VALUE=\"Logowanie\"></P></FORM>';
  14.  
  15. ?>


--------------------

"Myśl, myśl, myśl..." - Kubuś Puchatek || "Manual, manual, manual..." - Kubuś Programista
"Szukaj, szukaj, szukaj..." - Kubuś Odkrywca || "Debuguj, debuguj, debuguj..." - Kubuś Developer

Go to the top of the page
+Quote Post
sylsaw
post 20.07.2005, 10:43:44
Post #5





Grupa: Zarejestrowani
Postów: 62
Pomógł: 0
Dołączył: 29.06.2005

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


oki , juz jest git , wyswietla pojedynczo, tylko wczesniej mowilem z tym kolorem, jak dodaje ta linike, i po zalogowaniu wyskakuje taki blad

Warning: Cannot add header information - headers already sent by (output started at C:\FoxServ\www\SpisPrac\weryf.php:2) in C:\FoxServ\www\SpisPrac\weryf.php on line 12

Warning: Cannot add header information - headers already sent by (output started at C:\FoxServ\www\SpisPrac\weryf.php:2) in C:\FoxServ\www\SpisPrac\weryf.php on line 13
Go to the top of the page
+Quote Post
Levabul
post 20.07.2005, 10:46:28
Post #6





Grupa: Zarejestrowani
Postów: 197
Pomógł: 0
Dołączył: 11.07.2005

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


dodaj
  1. <?php ob_start(); ?>
przed !DOCTYPE (albo przed <html>)


--------------------
Go to the top of the page
+Quote Post
sylsaw
post 20.07.2005, 10:51:02
Post #7





Grupa: Zarejestrowani
Postów: 62
Pomógł: 0
Dołączył: 29.06.2005

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


gitara, dzieki
Go to the top of the page
+Quote Post

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 Wersja Lo-Fi Aktualny czas: 14.08.2025 - 11:40