breksis Posted December 18, 2004 Report Share Posted December 18, 2004 taax.. man ir uztaisiits shis te kods ieksh links.php <table><form method="post" action="pievienots.php" align=center><input type=hidden value= name=" "><input type=hidden value= name=""><input type=hidden value=add name="action"><tr><td align=center>Vārds:</td><td><input type="text" name="name" align=center value=""></td></tr><tr><td align=center>Epasts:</td><td><input type="text" name="email" align=center value=""></td></tr><tr><td align=center>http://</td><td><input type="text" name="web" align=center value=""></td></tr><tr><td align=center><div align=center>Apraksts:</div></td><td><TEXTAREA NAME="text" ROWS="10" COLS="50" align=center></textarea></td></tr></table><div align=center><input type="submit" value="Sūtīt"></div></form><center> .. taatad... man vajag lai cilveeka ievadiitaa informaacija [vaards;epasts..] tiek uzraadiits pievienots.php .. tas ir laikam vienkaarshi bet kaa to izdariit?? luuCu pasakiet.. Link to comment Share on other sites More sharing options...
breksis Posted December 18, 2004 Author Report Share Posted December 18, 2004 (edited) Nu pllz.. LuuCu pasakiet, kaa!?~?~ Edited December 18, 2004 by breksis Link to comment Share on other sites More sharing options...
rudzis Posted December 18, 2004 Report Share Posted December 18, 2004 Cik es saprotu, tad tev tā linku lapa ir parasts html dokuments, kurā tev stāv tā forma. Es tev ieteiktu darīt šādi: Taisi failu: forma.htm un ieliec tur visu šito savu kodu. Pēc tam taisi pievienots.php pēc principa: <? $name = $_POST['name']; // dabonam to visu infu.... $email = $_POST['email']; $web = $_POST['web']; $text = $_POST['text']; $fails = fopen('links.txt', 'a'); // atveram failu, kur tas viss glabāsies $rakstit = "$name|$email|$web|$text/n"; // Saliekam, kaa viss ierakstiisies fwrite($fails, $rakstit); // rakstam fclose($fails); // aizveram failu echo "Informācija nosūtīta!"; // Iepriecinam lietotāju;) ?> Pēc tam taisi failu, kur tai infai jāparādās, piem. links.php <? echo "<ul>"; $linki = file('links.txt'); // atveram failu, kā masīvu $cik = count($linki)-1; // saskaitam ierakstus for ($g=0;$g<=$cik;$g++){ $dati=explode("|", $linki[$g]); //sadalam katru ierakstu echo "<li>Vārds: $dati[0] E-pasts: $dati[1] Web: $dati[2] Apraksts: $dati[3]"; // izmetam smukaa sarakstiņā } echo "</ul>"; ?> Nu tad pēc šitiem koda gabaliem viņš rakstīs vienā failā visu to informāciju, bet links.php tas viss parādīsies smukā sarakstiņā ;) Ceru, ka sapratu, ko tu gribi izdarīt. Droši vien kaut kur pieļāvu kļūdu, jo rakstīju ātri, bet ceram principu saprati. Link to comment Share on other sites More sharing options...
breksis Posted December 18, 2004 Author Report Share Posted December 18, 2004 Paldies, par to pashu, tuliit kjershos klaat notesteeshanai.. Link to comment Share on other sites More sharing options...
rudzis Posted December 18, 2004 Report Share Posted December 18, 2004 Nu ja ir kāda kļūda tad saki, bet pirmajā koda gabalā pie newline simbola /n pagriez slīpsvītru uz otru pusi, a to neies. Link to comment Share on other sites More sharing options...
breksis Posted December 18, 2004 Author Report Share Posted December 18, 2004 Jaa, to es ieraudziiju... Tu nevari pateikt kodu kas automatiski piem. no index.html faila paarlec uz index2.html Link to comment Share on other sites More sharing options...
rudzis Posted December 18, 2004 Report Share Posted December 18, 2004 No html tev vish nekur nepārleks. Ar php: <? header("location: index2.html"); ?> Link to comment Share on other sites More sharing options...
Grey_Wolf Posted December 20, 2004 Report Share Posted December 20, 2004 uzraksti javaa :) <script langue="JavaScript"> window.location.replace('indexx.php') </script> kur indexx.phh tava lapa uz kuru jaapaaradreesee tobish URL Link to comment Share on other sites More sharing options...
laacz Posted December 20, 2004 Report Share Posted December 20, 2004 uzraksti javaa :) Atļaušos piebilst, ja nevis Javā, bet "JavaScriptā". Java un JavaScript ir divas pilnīgi dažādas lietas. Link to comment Share on other sites More sharing options...
Grey_Wolf Posted December 20, 2004 Report Share Posted December 20, 2004 Atļaušos piebilst, ja nevis Javā, bet "JavaScriptā". Java un JavaScript ir divas pilnīgi dažādas lietas. 12358[/snapback] Nu jā pārteicos :( Link to comment Share on other sites More sharing options...
Recommended Posts