Ingri Posted March 10, 2006 Report Share Posted March 10, 2006 Sveiki, <form action="fails.htm" method="post"> A:<input type="radio" checked="checked"name="razhotajs"value="A"><br> B: <input type="radio"name="razhotajs" value="B"><br> <input type ="submit" value ="Submit"> </form> kaa var panakt, lai tiktu raadiiti rezultati shai primitivai aptaujai? kas butu jaieraksta lai "fails.htm" stradatu un vel pie tam izdotu rezultatu (kaut kur,piemeram zem pashas aptaujas)=[[[[ with real respect, Me_ Link to comment Share on other sites More sharing options...
Delfins Posted March 10, 2006 Report Share Posted March 10, 2006 kamooon... Kas jāizdara, lai nopelnītu ļimonu? Link to comment Share on other sites More sharing options...
v3rb0 Posted March 10, 2006 Report Share Posted March 10, 2006 http://paste.php.lv/3409 zinu, zinu ka tā netaisa, bet nu blasosanas scripc ir :) Link to comment Share on other sites More sharing options...
bubu Posted March 10, 2006 Report Share Posted March 10, 2006 Skaisti :) Vēl varēji īsāk arī šo: $j = count($me); for($i = 0; $i < $j; $i++) { fwrite($h,$me[$i]); } fclose($h); uzrakstīt kā: fwrite($h, implode("", $me)); Link to comment Share on other sites More sharing options...
Delfins Posted March 10, 2006 Report Share Posted March 10, 2006 (edited) mjā... man šitādi patīk ;) fopen(__FILE__,'w'); ekstremāli :) Edited March 10, 2006 by Delfins Link to comment Share on other sites More sharing options...
Analgiins Posted March 10, 2006 Report Share Posted March 10, 2006 heh, tjip aiziet contest par mazaako kodu :D Link to comment Share on other sites More sharing options...
Delfins Posted March 10, 2006 Report Share Posted March 10, 2006 (edited) value nomainam uz INT tipu (A=1, B=2, ...) $resArr = @ unserialize(file_get_contents('dati.dat')); @ $resArr[(int)$_POST['razhotajs']]++; @ file_put_contents('dati.dat',serialize($resArr)); @ printf( "A= %d<br />B= %d", $resArr[1], $resArr[2] /*...*/ ); Edited March 10, 2006 by Delfins Link to comment Share on other sites More sharing options...
Machuss Posted March 10, 2006 Report Share Posted March 10, 2006 (edited) bet šeit taču runa iet par JavaScript nevis PHP, vismaz taa vajadzeetu buut a kaa lai veido ja PHP hostings nav pieejams? Edited March 10, 2006 by Machuss Link to comment Share on other sites More sharing options...
bubu Posted March 10, 2006 Report Share Posted March 10, 2006 Ar jebkuru citu piedāvāto serverside skripu/programmu valodu (perl,python,Delphi,C,ASP,whatever...). Link to comment Share on other sites More sharing options...
Machuss Posted March 11, 2006 Report Share Posted March 11, 2006 Ar jebkuru citu piedāvāto serverside skripu/programmu valodu (perl,python,Delphi,C,ASP,whatever...). Nu DHTML robezhaas tad tieshaam nezinu kaa veidot. Link to comment Share on other sites More sharing options...
bubu Posted March 11, 2006 Report Share Posted March 11, 2006 Ar tīru dhtml to nevarēs. Nu varēs tikai tādā līmenī, ka lietotājs redzēs savas atbildes rezultātu, bet ne citu lietotāju. Vajag kādu server-side skripu/programmu. Link to comment Share on other sites More sharing options...
Recommended Posts