Einars Posted February 11, 2005 Report Share Posted February 11, 2005 Kapec man tik vins nem pa veinam lodzinam nevis abus kopa ? Ja viena ir ierakstits, bet otra ne, tad vins skaita ka ir pilni. Un tapat ar otru lodzinu... Ka, lai abus postu apvienu, lai vins nemtu, ka vienu vesalu ? Es liku vienas iekavas, tad vispar negaja. Tagad vismaz iet katrs posts savas iekavas. :ph34r: <html> <head> <title></title> </head> <body> <?php if(isset($_POST['oki'])){ if(empty($_POST['lauks1']) == ($_POST['lauks2'])){ echo 'viss oki'; }else{ echo 'galigi garam'; } } ?> <form action="" method="POST"> <input type="text" name="lauks1"> <br> <input type="text" name="lauks2"> <br> <input type="submit" name="oki" value="gogogo"> </form> </body> </html> Link to comment Share on other sites More sharing options...
Venom Posted February 11, 2005 Report Share Posted February 11, 2005 skaties: if (empty($_POST['lauks1']) == ($_POST['lauks2'])) ja (lauks ir tukšs) - true vai false => ja false/true == ar $_POST['lauks2'] vērtību? if (!empty($_POST['lauks1'])) && !empty($_POST['lauks2']) && $_POST['lauks1']==$_POST['lauks2']) { //oki } else { //vai nu tukš viens no laukiem, vai arī nesakrīt } Link to comment Share on other sites More sharing options...
Einars Posted February 11, 2005 Author Report Share Posted February 11, 2005 (edited) thx pieleca :) Edited February 11, 2005 by Einars Link to comment Share on other sites More sharing options...
Einars Posted February 11, 2005 Author Report Share Posted February 11, 2005 (edited) ups sorry :( pa tuksu postu.. ta sanaca Edited February 11, 2005 by Einars Link to comment Share on other sites More sharing options...
Einars Posted February 12, 2005 Author Report Share Posted February 12, 2005 (edited) Meiginu uztaist vienkarsu piemerinu ka gamez forums. Ieraksti topika nosaukumu un textu. Uzklikskini uz nosaukuma un paradas ievaditais text. Pavisam vienkarsi. Rekur man meiginajums to realizet, bet bez panakumiem. <html> <head> <title></title> </head> <body> <?php if(isset($_POST['submit'])){ $vrkaksts = $_POST['vrkaksts']; $text = $_POST['text']; } if(isset($_GET['vrkaksts'])){ echo '<a href="'.$text.'"></a>'.$vrkaksts.'<br>'."\n"; } ?> <form action="" method="get"> <table> <input type="text" name="vrkaksts" size=80> <br> <input type"textarea" name="text" cols=120 rows=12> <br> <input type="submit" name="submit" value="sutit" </table> </form> </body> </html> Edited February 12, 2005 by Einars Link to comment Share on other sites More sharing options...
orion Posted February 12, 2005 Report Share Posted February 12, 2005 <form action="" method="get"> metode tev ir GET, bet 3 vietaas datus sanjem ar POST, tikai vienaa ar GET, kas tad tru var sanaakt? a? Link to comment Share on other sites More sharing options...
Einars Posted February 12, 2005 Author Report Share Posted February 12, 2005 var pakaoriget lai man sanaktu ? a Link to comment Share on other sites More sharing options...
orion Posted February 12, 2005 Report Share Posted February 12, 2005 izmaini method="post" un vietu: if(isset($_GET['vrkaksts'])){ izmaini uz if(isset($_POST['vrkaksts'])){ Tad vajadzeetu straadaat. Un prieksh kam tev tur 2 ifi ir? ja ir submits un ja ir masiiva elements. Prieksh kam? Pietiek ar vienu. Link to comment Share on other sites More sharing options...
Einars Posted February 12, 2005 Author Report Share Posted February 12, 2005 (edited) izmaini method="post" un vietu: if(isset($_GET['vrkaksts'])){ izmaini uz if(isset($_POST['vrkaksts'])){ Tad vajadzeetu straadaat. Un prieksh kam tev tur 2 ifi ir? ja ir submits un ja ir masiiva elements. Prieksh kam? Pietiek ar vienu. 13655[/snapback] $virsraksts => $text... neka neiet izmeiniju. Man visraktam vaidzeja paradities ka linkam uz kura uzspiezot paradas text... Edited February 12, 2005 by Einars Link to comment Share on other sites More sharing options...
orion Posted February 12, 2005 Report Share Posted February 12, 2005 Nezinu, ko lai tev iesaka. Njem kaadu step by step manuaali un maacies. Tev tur galiigi nekaa kodaa nav taada, lai izpildiitos tas, ko gribi! Pilniigi shkjiibi! Izskataas ka nekaadas nojeegas tev nav par POST un GET. Kaa katram tiek padoti parametri. Un vispaar kaa kas straadaa. Link to comment Share on other sites More sharing options...
Einars Posted February 12, 2005 Author Report Share Posted February 12, 2005 GET - dabūt POST - sūtīt es domaju ar POST aizsutit uz manigajiem un no manigajiem ar GET dabut... Link to comment Share on other sites More sharing options...
orion Posted February 12, 2005 Report Share Posted February 12, 2005 GET - dabūtPOST - sūtīt es domaju ar POST aizsutit uz manigajiem un no manigajiem ar GET dabut... 13662[/snapback] Redz kāds tu meistars (((: /me pareec... Tepat foruma pameklee atbildes uz jautaajumiem... ((: Ir vairaakas vietaas aprakstiits, kas iisti ir GET un POST Katraa zinjaa abi vinji ir masiivi, kuros glabaajas no faila uz failu nododamo mainiigo veertiibas, GET padod mainiigo veertiibas caur URL, bet POST - tev neredzamā veidā ((: Ja padod ar GET, tad arii jāsaņem ar GET ja ar POST, tad ar POST arii saņem! (: piemeram: ir URL ~piu.php?id=skunkss&stat=online $id=$_GET['id']; $stat=$_GET['stat']; echo $id.' ir '.$stat; //atgriež tekstu: "skunkss ir online" No formas jams jau pats automaatiksi padosies pa linku, ja buus metode GET izmantota. Ja buus metode POST izmantota, tad arī savāc datus $id=$_POST['id']; u.t.t. Link to comment Share on other sites More sharing options...
Recommended Posts