osk Posted February 13, 2005 Report Share Posted February 13, 2005 Kads var palidzet ar vienkaarsho skaitishanu? Man vajag formu, kuraa ir poga. Pogu nospiezhot mainigajam japieaug par 1 un taa visu laiku kamer spiezh pogu, t.i., 10x nospiedi - $mainigais=10 Kur problema? Link to comment Share on other sites More sharing options...
Gacha Posted February 13, 2005 Report Share Posted February 13, 2005 Problēma ir tā, ka nospiežot pogu tu mainigajam pieskaiti viens, bet tad lapa pārlādējas un mainīgais atkal iegūst sākuma vērtību. Vienīgie 2 varianti ir saglabāt mainīgā vērtību kukijā vai sesijā. PS. Izskatās, ka tu nesaproti, to, ka PHP izpildās uz servera, nevis uz tavas kastes. Link to comment Share on other sites More sharing options...
Venom Posted February 14, 2005 Report Share Posted February 14, 2005 $_POST['plus']=empty($_POST['plus'])?0:(int)$_POST['plus']; echo '<form method="post" method="'.$_SERVER['PHP_SELF'].'"> <input name="plus" value="'.(++$_POST['plus']).'" readonly="readonly" /> <input type="submit" /></form>'; Link to comment Share on other sites More sharing options...
osk Posted February 14, 2005 Author Report Share Posted February 14, 2005 Kaut kas ir dzirdeeets, ka php ir servera dalja. ;o)) Tikai gribeejaas, lai var iztikt bez sesijaam, lai adreses josla netiktu piesmereeta un ar kukiem jau ar nevienmer viss ir tip top. Venom, paldies ;o) Link to comment Share on other sites More sharing options...
bubu Posted February 14, 2005 Report Share Posted February 14, 2005 Adreses joslai nav nekāda sakara ar kukijiem! Link to comment Share on other sites More sharing options...
osk Posted February 14, 2005 Author Report Share Posted February 14, 2005 Par kukiem piekritu, joslaa tiem vietas nav. Link to comment Share on other sites More sharing options...
orion Posted February 15, 2005 Report Share Posted February 15, 2005 Gribi teikt, ka sesijaam ir? Link to comment Share on other sites More sharing options...
PheliX Posted February 15, 2005 Report Share Posted February 15, 2005 sesijaam ir sakars - ja nav kuukiji var izmantot GET... Link to comment Share on other sites More sharing options...
Grey_Wolf Posted February 15, 2005 Report Share Posted February 15, 2005 sesijaam ir sakars - ja nav kuukiji var izmantot GET... 13714[/snapback] piekriitu :) jo href="bla.php?<?php print SID; seesijas straadaas pat ja kuukiji buus izsleekti :) (ja buus iesleegti adresu laukaa nekas netiks ierakstiits - tas paliks tuksh :) Vieniigi jaceras ka SID jaabuut PEDEJAM - jo savaadaak var sanaakt visaadi ;) Link to comment Share on other sites More sharing options...
Recommended Posts