lazda144 Posted December 9, 2007 Report Share Posted December 9, 2007 Vareetu luudzu iedot kaads vienkaarsu aptaujas skriptu?? Link to comment Share on other sites More sharing options...
Val Posted December 9, 2007 Report Share Posted December 9, 2007 nu tad pool vai aptauju, ko īsti? Link to comment Share on other sites More sharing options...
lazda144 Posted December 9, 2007 Author Report Share Posted December 9, 2007 ir atskiriiba?? nu labi aptauju Link to comment Share on other sites More sharing options...
NBX Posted December 9, 2007 Report Share Posted December 9, 2007 (edited) pool stands for baseins. Edited December 9, 2007 by NBX Link to comment Share on other sites More sharing options...
blackhalt Posted December 9, 2007 Report Share Posted December 9, 2007 Diez vai tik vienkāršs sanāks. http://www.hotscripts.com/search/?q=poll&a...cense_type=free Link to comment Share on other sites More sharing options...
blackhalt Posted December 9, 2007 Report Share Posted December 9, 2007 Vienkāršs ;) http://paste.php.lv/6558 Link to comment Share on other sites More sharing options...
marcis Posted December 10, 2007 Report Share Posted December 10, 2007 pornogrāfija! Link to comment Share on other sites More sharing options...
Aleksejs Posted December 10, 2007 Report Share Posted December 10, 2007 pool - baseins, amerikāņu biljards poll - aptauja, stabs ;) Link to comment Share on other sites More sharing options...
lazda144 Posted December 10, 2007 Author Report Share Posted December 10, 2007 aleksej tildes vaardniicu lietot tu proti :) man par to blackhalt doto skriptu ir viens jautajums vai var uzlikt ka vins paraada kopējo atbilzu skaitu un paraada arii cik procentu no visaam atbildeem ir piemeeram atbilde "Jā" Link to comment Share on other sites More sharing options...
G-Style Posted December 10, 2007 Report Share Posted December 10, 2007 Pat neskatoties skriptu man atbilde ir : JAA, var! :) Bet neviens Tev te neraxtiis prieksaa kaa, jo ir pasham jaadomaa un jaastuko,nevis jaapanem gatavs scripts un jaanaak uz sejieni , lai citi palabo,pielaago tavaam vajadziibaam. Un hotscripts ir pilns ar poll scriptiem, kaadus vien veelies. P.S Counteristus un cs monitoristus te nemiil, tici man!:) Link to comment Share on other sites More sharing options...
Aleksejs Posted December 10, 2007 Report Share Posted December 10, 2007 Jā, var! $kopejais_skaits=$atb1+$atb2; $procenti_atb1 = round(100 * $atb1 / $kopejais_skaits); $procenti_atb2 = 100 - $procenti_atb1; P.S. Tildes vārdnīcu man neviens nedod... Nākas izlīdzēties ar galvu ;) Link to comment Share on other sites More sharing options...
lazda144 Posted December 10, 2007 Author Report Share Posted December 10, 2007 kur tas ir jaaliek?? <?php $atb1=file_get_contents('1.txt'); $atb2=file_get_contents('2.txt'); ?> <form method="post" action=""> <p> Ja <input name="radiobutton" type="radio" value="radio1" /> <?php echo $atb1; ?> </p> <p>Ne <input name="radiobutton" type="radio" value="radio2" /> <?php echo $atb2; ?> </p> <p> <input type="submit" name="Submit" value="Submit" /> </p> </form> <?php if(isset($_POST['Submit'])&&isset($_POST['radiobutton'])){ if($_POST['radiobutton']=='radio1'){ $raksta=$atb1+1; $fp=fopen('1.txt','w+'); fwrite($fp,$raksta); fclose($fp); } if($_POST['radiobutton']=='radio2'){ $raksta=$atb2+1; $fp=fopen('2.txt','w+'); fwrite($fp,$raksta); fclose($fp); } } ?> Link to comment Share on other sites More sharing options...
blackhalt Posted December 10, 2007 Report Share Posted December 10, 2007 Vispār tur daudz kas vēl jāliek. Vieglāk būtu ar datubāzi. Jāpārbauda un jānofiltrē visi $_POST dati. Japārbauda IP, lai nevar nobalsot otreiz un tādā garā. Kukijus varētu arī lietot. Var pavisam savādāk kodēt. Vai nu meklē, jau gatavus balsošanas skriptus un pielāgo, vai mokies un kodē pats ;) Link to comment Share on other sites More sharing options...
lazda144 Posted December 10, 2007 Author Report Share Posted December 10, 2007 (edited) itkaa savienoju tikai ka pielikt procentu ziimi aiz procentu skaita ? <?php $atb1=file_get_contents('1.txt'); $atb2=file_get_contents('2.txt'); $kopejais_skaits=$atb1+$atb2; $procenti_atb1 = round(100 * $atb1 / $kopejais_skaits); $procenti_atb2 = 100 - $procenti_atb1; ?> <form method="post" action=""> <p> Ja <input name="radiobutton" type="radio" value="radio1" /> <?php echo $atb1.- $procenti_atb1; ?> </p> <p>Ne <input name="radiobutton" type="radio" value="radio2" /> <?php echo $atb2. - $procenti_atb2.proc; ?> </p> <p> <input type="submit" name="Submit" value="Submit" /> </p> <p> <?php echo "Kopaa balsu ".$kopejais_skaits; ?> </p> </form> <?php if(isset($_POST['Submit'])&&isset($_POST['radiobutton'])){ if($_POST['radiobutton']=='radio1'){ $raksta=$atb1+1; $fp=fopen('1.txt','w+'); fwrite($fp,$raksta); fclose($fp); } if($_POST['radiobutton']=='radio2'){ $raksta=$atb2+1; $fp=fopen('2.txt','w+'); fwrite($fp,$raksta); fclose($fp); } } ?> Edited December 10, 2007 by lazda144 Link to comment Share on other sites More sharing options...
blackhalt Posted December 10, 2007 Report Share Posted December 10, 2007 echo $atb2.' - '.$procenti_atb2.' proc'; Link to comment Share on other sites More sharing options...
Recommended Posts