Klokjis Posted July 28, 2005 Report Share Posted July 28, 2005 kjipa regjistraacijas forma... un ja kaads laux nav aizpildiits, augshaa paraadaas - Kljuuda! pamapram... tas nav aizpildiits... bet viss kas bija ailiitees ieraxtiic - pazuud... kaa taas veertiibas vareetu saglabaat?!? Link to comment Share on other sites More sharing options...
bubu Posted July 28, 2005 Report Share Posted July 28, 2005 <?php echo '<input type="text" name="lauks" value="'.$_POST['lauks'].'"/>'; echo '<textarea name="area">'.$_POST['area'].'</textarea>'; ?> Link to comment Share on other sites More sharing options...
Klokjis Posted July 28, 2005 Author Report Share Posted July 28, 2005 tnx! Link to comment Share on other sites More sharing options...
Klokjis Posted July 28, 2005 Author Report Share Posted July 28, 2005 nu ok a kaa tad piem: kur saakumaa value vajag 'http://' kjipa <? if(!$_POST['majaslapa']) {$_POST['majaslapa'] = 'http://';} ?> ... <? echo '<input type="text" name="majaslapa" class="aile" value="'.$_POST['majaslapa'].'"/>' ?> so? un kaa saglabaat chechkboxiem - checked... of not?! Link to comment Share on other sites More sharing options...
bubu Posted July 28, 2005 Report Share Posted July 28, 2005 Nesapratu, kur problēma ar http:// A par čekboksiem vienkārši liec checked="checked" tam input elementam, kurš bija ieķeksēts, pārējos bez tā checked drukā. Link to comment Share on other sites More sharing options...
Gacha Posted July 28, 2005 Report Share Posted July 28, 2005 un kaa saglabaat chechkboxiem - checked... of not?!Čekboksiem ir tā, ja tas ir iečekots, tad pēc posta tiek saņemts mainīgais ar vērtību 'on', ja nav ieķeksēts, tad vispar tāds neuzrādās. Un saglabāt to vari šādi: echo '<input type="checkbox" name="keksis"'.(isset($_POST['keksis'])?' checked="checked"':'').'/>'."\n"; Link to comment Share on other sites More sharing options...
bubu Posted July 28, 2005 Report Share Posted July 28, 2005 (edited) pēc posta tiek saņemts mainīgais ar vērtību 'on' Un ja man ir <input name="bla" type="checkbox" value="off"/> ? :) Edited July 28, 2005 by bubu Link to comment Share on other sites More sharing options...
Gacha Posted July 28, 2005 Report Share Posted July 28, 2005 Un jēga chekboksim likt vertību? B) Link to comment Share on other sites More sharing options...
bubu Posted July 28, 2005 Report Share Posted July 28, 2005 Es tak nez. Nu piemēram, ja grib čekbokšus ar ID vērtībām no datubāzes. Kā name nevarēs izmantot (nedrīkst sākties ar ciparu neims), bet kā value jā. Vai arī variants ar: <input name="bla[]" type="checkbox" value="1" /> <input name="bla[]" type="checkbox" value="2" /> (tipa kā multiple select) Link to comment Share on other sites More sharing options...
Gacha Posted July 28, 2005 Report Share Posted July 28, 2005 Nu sākumā biju domājis par šo variantu, kas tam bija nepieciešams, bet tas ko tu rādi viņam vēlāk noderēs, kad gribēs smuki tos lietotājus dzēst - nevis pa vienam, bet masveidā :) Link to comment Share on other sites More sharing options...
Klokjis Posted July 28, 2005 Author Report Share Posted July 28, 2005 nu jaa par tiem checkboxiem ir skaidrs... bet par to maajaslapu veel jaapachakareejas... mosh arii skaidrs! Link to comment Share on other sites More sharing options...
Gacha Posted July 28, 2005 Report Share Posted July 28, 2005 Varbūt pasaki to ko nesaproti, gan jau palīdzēsim Link to comment Share on other sites More sharing options...
Recommended Posts