dutchy Posted August 10, 2005 Author Report Share Posted August 10, 2005 doma tāda piemēram lauciņš tavs Vārds u.c. pirmoreiz aizpilda un es apskatos! klaat arī i.p. adrese Link to comment Share on other sites More sharing options...
SkaKri Posted August 10, 2005 Report Share Posted August 10, 2005 nezinu, es neesmu gudrs. :D var mēģināt izdomāt kkā, ka viss ir uz formas - vārds, utt, un hidden field - "ievāc" IP, tad POST un uala! viss "ieseivojas" count.inc, vai kaa savaadaak nosauc, jo tas vairs nebuus tik "kaunteris" :DD Link to comment Share on other sites More sharing options...
bubu Posted August 10, 2005 Report Share Posted August 10, 2005 Vai tu vispār zini, ko nozīmē $_POST['username'] ? Link to comment Share on other sites More sharing options...
dutchy Posted August 10, 2005 Author Report Share Posted August 10, 2005 godiigi sakot nee - no php maz ko jeedzu. Varbūt html veidā var ierakstīt vārdu, pie vārds failā ip_adreses.txt saglabājas arī viņa i.p. ? Link to comment Share on other sites More sharing options...
Analgiins Posted August 10, 2005 Report Share Posted August 10, 2005 kaut kur fantastisks sarkans backgrounds paraadiijaas, tikai kur... :blink: Link to comment Share on other sites More sharing options...
bubu Posted August 10, 2005 Report Share Posted August 10, 2005 $_POST['username'] nozīmē, ka php fails apstrādās formu, kurai action norāda uz šo skriptu, method="POST" un formā ir ievadāms lauks <input type="text" name="username" /> Tāpēc jau arī nekas nerakstās, ka tev nav nekādas formas. Link to comment Share on other sites More sharing options...
dutchy Posted August 10, 2005 Author Report Share Posted August 10, 2005 aa, tad moška šitā derēs? <?php $f = fopen('ip_adreses.txt', 'a'); fwrite($f, $_POST['username'] . '=' . $_SERVER['REMOTE_ADDR'] . "\n"); fclose($f) ?> <html> <form action="ip_adreses.txt" method="post"> <h1>Tavs vārds</h1> <table> <tr><td>Vārds:</td><td><input type="text" name="username"></td></tr> </html> Link to comment Share on other sites More sharing options...
dutchy Posted August 10, 2005 Author Report Share Posted August 10, 2005 nee kaut kas neit http://www.srt.lv/news.php Link to comment Share on other sites More sharing options...
SkaKri Posted August 10, 2005 Report Share Posted August 10, 2005 (edited) aa, tad moška šitā derēs? <?php $f = fopen('ip_adreses.txt', 'a'); fwrite($f, $_POST['username'] . '=' . $_SERVER['REMOTE_ADDR'] . "\n"); fclose($f) ?> <html> <form action="ip_adreses.txt" method="post"> <h1>Tavs vārds</h1> <table> <tr><td>Vārds:</td><td><input type="text" name="username"></td></tr> </html> 20739[/snapback] hmm - jābūt tā!!! - ps: filename sauc citaadaak... kautvai tests.php, vai tests.htm :D <html> <head> </head> <body> <form name="form1" method="post" action="ip_adreses.php"> <input type="text" name="username"> </form> </body> </html> un wnk izmaini "ip_adreses.php" pret to news.php... un pogu neliku - netiik - wnk piespied enter :P Edited August 10, 2005 by SkaKri Link to comment Share on other sites More sharing options...
bubu Posted August 10, 2005 Report Share Posted August 10, 2005 (edited) ...formu, kurai action norāda uz šo skriptu, ... 20738[/snapback] <form action="ip_adreses.txt" method="post"> ip_adreses.txt ir skripts? Edited August 10, 2005 by bubu Link to comment Share on other sites More sharing options...
dutchy Posted August 10, 2005 Author Report Share Posted August 10, 2005 tavs kods : http://www.srt.lv/news.php , kaut kas nerakstās te http://www.srt.lv/ip_adreses.php! Link to comment Share on other sites More sharing options...
SkaKri Posted August 10, 2005 Report Share Posted August 10, 2005 (edited) ip_adreses.txt ir skripts? 20742[/snapback] :P tieši tā formai jaaizsauc news.php (pēc šitā varianta) darbību! ps: man iet :] Edited August 10, 2005 by SkaKri Link to comment Share on other sites More sharing options...
SkaKri Posted August 10, 2005 Report Share Posted August 10, 2005 hei apskaties to ip_adreses.txt - tikko "iespiedos" aaaaaaa :D IET??? Link to comment Share on other sites More sharing options...
SkaKri Posted August 10, 2005 Report Share Posted August 10, 2005 (edited) dutchy??? TU TIKKO VISU SAJAUCI! ok - saakam no saakuma. uztaisi ==================test.php============================== <form action="test_ok.php" method="post"> <h1>Tavs vārds</h1> <table> <tr><td>Vārds:</td><td><input type="text" name="username"></td></tr> </form> SPIED ENTER! ===================================================== uztaisi txt failu: ip_log.txt ===================================================== un tagad: =================test_ok.php============================ <?php $f = fopen('ip_log.txt', 'a'); fwrite($f, $_POST['username'] . '=' . $_SERVER['REMOTE_ADDR'] . "\n"); fclose($f) ?> <b>paldies - jūsu dati saglabāti arhivācijā. :P</b> ===================================================== UN viss... kas tur tik grūts. pat es sapratu . haha. :DD Edited August 10, 2005 by SkaKri Link to comment Share on other sites More sharing options...
bubu Posted August 10, 2005 Report Share Posted August 10, 2005 Tieš tā, SkaKri. Link to comment Share on other sites More sharing options...
Recommended Posts