Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]haslo do ukrytego konta
adrianstachurski
post
Post #1





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 24.09.2007

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


Siema mam problem dlugo w php nierobie ale chce zrobic cos jak konto ukryte chodzi mi o to ze jest miejsce do wpisania numeru konta


index.php
  1. <TABLE BORDER=0 CELLPADDING=1>
  2. <form action="konto.php" method="POST"><br>
  3. <TR><TD>numer konta:</TD><TD><input type="password" name="numerkonta" size=10 maxlength=10></TD></TR><TD><input type="submit" value="Ok!"/></TD>
  4.  
  5. </html>

konto.php
  1. <?php $ok= "ok.php";
  2.  
  3. if numerkonta = 11
  4. echo 'wszystko ok';
  5.  
  6. ?>



dobrze ja to robie questionmark.gif questionmark.gif bo niemoge tego napisac ;/ narazie chociasz zeby wyskakiwal napis wszystko ok a potem robie redirect do ukrytego adresu zrobie pomocy exclamation.gif exclamation.gif !

Ten post edytował adrianstachurski 24.09.2007, 17:26:41
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 14)
Cysiaczek
post
Post #2





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




Popraw proszę tytuł topiku na zgodny z zasadami forum Przedszkole

Napisz po ludzku i użyj do tego języka polskiego. Nic nie rozumiem z Twojego posta.

Pozdrawiam.


--------------------
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
adrianstachurski
post
Post #3





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 24.09.2007

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


Mi chodzi o to zeby po wpisaniu numeru w pole wyskoczyl mi ukryty adres a jesli zle wpisze login to mi wyskoczy ze zly numer rozumiessz juz ?

robie to teraz na stronce mojej adres http://adrianek.webd.pl/index1.php
Go to the top of the page
+Quote Post
Cysiaczek
post
Post #4





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




Nie - dalej nie rozumiem, bo nie wiem, jakie jest kryterium poprawności wpisanego numeru? Baza danych, plik txt?
Wpiasałeś kawałek kodu, który pownien wyglądać raczej tak:
  1. <?php
  2. if($_POST['numerkonta']=='moj_tajny_numer')
  3. {
  4. print 'wszystko ok';
  5. }
  6. ?>

Tajny numer? A skąd ja mam wiedzieć, gdzie Ty go trzymasz?

Pozdrawiam.


--------------------
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
qqrq
post
Post #5





Grupa: Zarejestrowani
Postów: 418
Pomógł: 8
Dołączył: 16.11.2006

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


  1. <?php
  2. if ($_POST['numerkonta'] = '11')
  3.  echo 'wszystko ok';
  4. else
  5.  echo 'źle';
  6. ?>


Z palca

P.S. Gdzieś ty się uczył pisać questionmark.gif Nie chodzi mi o ortografię, ale znaki interpunkcyjne są po to żeby ich używać. I wyrażaj że się jaśniej.


--------------------
Go to the top of the page
+Quote Post
adrianstachurski
post
Post #6





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 24.09.2007

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


no i to to chodzi tylko teraz chce zeby mnie przezucal na adres pewnien jak dobze wpisze liczbe
  1. $fist= "http://fist.lua.pl/";
  2. <?php if($_POST['numerkonta']=='666')
  3. {
  4. header("Location: $fist");
  5. }
  6. ?>



cos jakis blad wylazi.... cos trzeba zmienic mysle ze mi pomozesz bo juz sil niemam a musze zrobic takas trone dla klubu szkolnego i wlasnie musi byc pewna sekcja pod takim haslem ;/

Ten post edytował adrianstachurski 24.09.2007, 17:22:34
Go to the top of the page
+Quote Post
Cysiaczek
post
Post #7





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




To może się podziel tym błędem? Widzisz tu gdzieś napis "wróżenie z postów"? biggrin.gif


--------------------
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
adrianstachurski
post
Post #8





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 24.09.2007

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


wiec teraz mam tak
  1. <?php if($_POST['numerkonta']=='666')
  2. {
  3. print 'wszystko ok';
  4. }
  5. else
  6. {
  7. echo 'Zly numer Konta';
  8. }
  9. ?>


i wyskakuje mi napisz "wszystko ok"
a problem w tym ze chce zeby mi dało redirect na jakis adres ukryty myslalem zeby dac np. $fist = "moj adres" przed ale cos niedziala

chcialem zeby bylo
  1. <?php $fist = "moj adres"
  2. if($_POST['numerkonta']=='666')
  3. {
  4. print '$fist';
  5. }
  6. else
  7. {
  8. echo 'Zly numer Konta';
  9. }
  10. ?>


Ten post edytował adrianstachurski 24.09.2007, 17:46:03
Go to the top of the page
+Quote Post
Cysiaczek
post
Post #9





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




Kod, który podałeś - powinien działać.
Czy $fist= "http://fist.lua.pl/"; znajduje się w bloku <?php ?> questionmark.gif?

P.S,. Wróżki wrózą z fusów, dłoni itd. Tutaj musiałbym wywróżyć rozwiązanie problemu bazując na Twoich postach. biggrin.gif


--------------------
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
adrianstachurski
post
Post #10





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 24.09.2007

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


no ja sie kapnolem po chwili hehe ale juz wkleilem normalnie ale i tak nie daje redira ;/ niewiem ? co jest

co z tym kodem zrobic zeby mnie przezucilo na strone ? kurde juz sam niewiem ;(

Ten post edytował adrianstachurski 24.09.2007, 17:48:41
Go to the top of the page
+Quote Post
Cysiaczek
post
Post #11





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




Włącz wyświetlanie błędów i ich reportowanie na E_ALL i wklej tutaj to, co wyświetla się na ekranie przy próbie uzycia header()
Jak to zrobić? Informacje tutaj


--------------------
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
adrianstachurski
post
Post #12





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 24.09.2007

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


  1. <?php
  2. $fist = "http://fist.lua.pl/";
  3. if($_POST['numerkonta']=='666')
  4. {
  5. header("Location: $fist");
  6. }
  7. else
  8. {
  9. echo 'Zly numer Konta';
  10. }
  11. ?>


Wyskakuje jakis blad ;/

Heyka znow sie odzywam zrobilem skrypt ale cos mi blad wylazi prosz o pomoc
  1. <?php $fileupload = "http://uploader.lua.pl/uploading/fileupload/";
  2. $fileupload1 = "http://uploader.lua.pl/uploading/fileupload1/";
  3. if($_POST['numerkonta']=='1')
  4. {
  5. header("Location: $fileupload");
  6. }
  7. if($_POST['numerkonta']=='2')
  8. {
  9. header("Location: $fileupload1");
  10. }
  11. else
  12. {
  13. echo 'Zly pin!';
  14. }
  15. ?>


kod bledu:


Warning: Cannot modify header information - headers already sent by (output started at /home/freehost/u/p/uploader/www/konto.php:8) in /home/freehost/u/p/uploader/www/konto.php on line 32
Zly pin!

http://uploader.lua.pl/ adres stronki na ktorej bedzie ten skrypt i niedziala to

Ten post edytował adrianstachurski 25.09.2007, 14:26:36
Go to the top of the page
+Quote Post
Cysiaczek
post
Post #13





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




Temat: Najczestsze bledy


--------------------
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
adrianstachurski
post
Post #14





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 24.09.2007

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


A mozesz mi powiedziec jak to zrobic wiesz o co mi chodzi.... czy ja to dobrze napisalem ?

jaki zrobilem w tym blad moze mi ktos napisac ten kod ?
Go to the top of the page
+Quote Post
Cysiaczek
post
Post #15





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




Dostałeś link, gdzie jest to wyjaśnione. gdybyś frazę wpisał w google, to ...
Cytat
Wyniki 1 - 10 spośród około 2,240,000 dla zapytania Warning: Cannot modify header information - headers already sent by


Kod, który podałeś nie zawiera tego błędu - błąd jest gdzie indziej.

Pozdrawiam.


--------------------
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

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: 19.08.2025 - 13:37