ricshs Posted June 8, 2006 Report Share Posted June 8, 2006 Lieta tāda: ir scripts, strādājošs, bet vajag pielabot tā, lai submitējot pogu "ok" .txt dokumentā viesi.txt rādītos visi tie nicki, ko atiecigais cilvēks ievadijis, un lai es pārskatot vinjus redzētu teiksim tā: [Rihards|Ricshs][Raimis|rimo] ... Nu domājams sapratāt, lūk scriptiņš! index.php <form action="action.php" method="post"> <p>Vārds: <input type="text" name="vārds" /></p> <p>BF2 spēlētāja vārds: <input name="nicks" size="10" type="text"><br></p><p><input type="submit" value="OK" /> action.php <? $fails="viesi.txt"; $atver=fopen($fails, "w"); $raksta=fwrite($atver, $_POST['vārds'].'|'.$_POST['nicks']); ?> Lūdzu palīdzat, man to vajag, lai es pēc tam uztaisitu freimu, un tur būtu viesu saraksts! Paldies jau iepriekš topošie un profesionālie programmētāji! Link to comment Share on other sites More sharing options...
Vebers Posted June 8, 2006 Report Share Posted June 8, 2006 (edited) <?php $f=fopen('viesi.txt', 'a'); fwrite(f, '['.$_POST['vārds'].'|'.$_POST['nicks']."]\r\n"); fclose($f); ?> Tā tiks ierakstīti visi lietotāja ievadītie dati katrs jaunā rindā. Ja pareizi esmu sapratis ko vēlies. Un izmanto taču search - nereti apspriests šis! Edited June 8, 2006 by MakaTaNaw Link to comment Share on other sites More sharing options...
ricshs Posted June 8, 2006 Author Report Share Posted June 8, 2006 (edited) http://tool.zyns.com/action.php kaut kas nav kārtībā scriptā, kuru iedevi... P.s Nenemiet vērā vārds un ciks! Edited June 8, 2006 by ricshs Link to comment Share on other sites More sharing options...
ricshs Posted June 8, 2006 Author Report Share Posted June 8, 2006 Lūdzu, ja kādam ir kādas idejas, tad lūdzu postojies, tas ir ļoti svarīgi! Link to comment Share on other sites More sharing options...
Vebers Posted June 8, 2006 Report Share Posted June 8, 2006 <?php if(!empty($_POST['name']) && !empty($_POST['nickname'])) { $f=fopen('viesi.txt', 'a'); (fwrite($f, '['.$_POST['name'].'|'.$_POST['nickname']."]\r\n")) ? print 'uraa, tavi dati ierakstiiti' : print 'baac, kaut kas nogaaja greizi'; fclose($f); } else { ?> <form action="action.php" method="post"> <p> Vaards: <input type="text" name="name" /> </p> <p> BF2 speeleetaaja vaards: <input name="nickname" size="10" type="text"/> <br /> </p> <p> <input type="submit" value="OK" /> </p> </form> <?php } ?> Link to comment Share on other sites More sharing options...
ricshs Posted June 8, 2006 Author Report Share Posted June 8, 2006 Man pat tev kauns prasīt, tu jau uzrakstiji vinju manā vietā, bet vari pateikt, kā un kur man tagad viss jāliek? Link to comment Share on other sites More sharing options...
Vebers Posted June 8, 2006 Report Share Posted June 8, 2006 action.php vai arī izsakies skaidrāk.. Link to comment Share on other sites More sharing options...
ricshs Posted June 8, 2006 Author Report Share Posted June 8, 2006 http://tool.zyns.com/viesi.php nevar submiteet =\ Link to comment Share on other sites More sharing options...
Vebers Posted June 8, 2006 Report Share Posted June 8, 2006 (edited) Neiet tā tava adrese.. Un vispār - RTFM !!! Edited June 8, 2006 by MakaTaNaw Link to comment Share on other sites More sharing options...
siicis Posted June 9, 2006 Report Share Posted June 9, 2006 a tev CHMOD ir nomainīts uz 777 ?Citādāk PHP nav rakstīšanas atļaujas failam un tas neko nevar ierakstīt. Link to comment Share on other sites More sharing options...
Recommended Posts