Einars Posted January 16, 2005 Report Share Posted January 16, 2005 Taka es esmu iesacejs, kurs macas vel PHP. Es meginaju uzmeistarot tadu lietu ka 2 parolu laucinu vienadibu. Es domaju ta lai psw1 un psw2 ir vienadi, ja nav met zinojumu "parbaudi paroli" Es it ka uztaosju, bet man neiet re kods: <html> <head> <title></title> </head> <body> <?php if(isset($_POST['submit'])){ if($_POST['psw1'] == $_POST['psw2']){ } echo 'tev sakrit paroles'; }else{ echo 'galigi garam'; } ?> <form action="paswparb.php" method="POST"> <br> <input type="text" name="psw1"> <br> <input type="text" name="psw2"> <br> <input type="submit" name="submit"> </body> </html> Link to comment Share on other sites More sharing options...
orion Posted January 16, 2005 Report Share Posted January 16, 2005 Taaksh, ceru ka nelieto register_globals ON. Ja taa, tad tev vajag izvilinaat lauku veertiibu no POST masiiva. tas daraas aptuveni taa: $psw1=$_POST['pswd1']; $psw2=$_POST['pswd2']; Attieciigi arii taalaak saliidzibi $psw1 un $psw2 veertiibas! Ja kaadreiz kkur kkas neiet - vienmeer skaties, kaadas veertiibas atgriezh tavi maniigie - taa vareesi atrast, kur ir kljuuda un noveerst to. Tagad, ja buutu zinaajis, ka abi tavi $_POST['psw1'] ir tukshi, tad arii savaadaak buutu uzdevis jautaajumu. Un mekleejot forumaa butuu atradis entos postus ar shiis probleemas risinajaumu!!! Link to comment Share on other sites More sharing options...
tamster Posted January 16, 2005 Report Share Posted January 16, 2005 (edited) if($_POST['psw1'] == $_POST['psw2']){ } echo 'tev sakrit paroles'; }else{ Edited January 16, 2005 by tamster Link to comment Share on other sites More sharing options...
Einars Posted January 16, 2005 Author Report Share Posted January 16, 2005 (edited) Nu ka tad vaiga man lai ietu ??? P.S man ir registr global = off P.S.S ir :) Edited January 16, 2005 by Einars Link to comment Share on other sites More sharing options...
bubu Posted January 16, 2005 Report Share Posted January 16, 2005 orion, tu lasīt kodu māki? :)) Tak kodā jau tiek izmantots $_POST['psw1'] nevis $psw1, tā kā pričom te vēl register globals. Link to comment Share on other sites More sharing options...
orion Posted January 16, 2005 Report Share Posted January 16, 2005 (edited) Dau, tamster paraadiija iiato probleemu ((: es kkaa atrumaa paarskreeju un nepiefikseeju, ka tu jau saliidzini $_POST masiiva datus. Fignja ir tamster noraadiitajaa iekavaa } Tajaa iekraasotajaa - paarvieto vinju AIZ echo 'tev sakrit paroles'; bubu - pats pamaniiju ((: no saakuma aatrumaa paarskreeju aatri paari un kkaa neiekrita ciis (: Pats parasti ieprieksh defineeju mainiigo ar POST veertiibu. ((: Edited January 16, 2005 by orion Link to comment Share on other sites More sharing options...
Recommended Posts