snaikers Posted September 9, 2006 Report Share Posted September 9, 2006 nu taa!! esmu apnjeemies saakt maaciities php !! draugs ieteca graamatu "php soli pa solim" nonaakot jau pie programeeshanas saakas probleemas!! vienu jau pats kautkaa izdomaaju, nezinu vai gluzhi pareizi bet iet tas kods !! bet shitais kods neiet !! saakums html ar visaam fiichaam <body> <form action="form_parse.php" method= "post"> <h3>Ievadi savu kontaktinformāciju: </h3><table> <tr><td>Vārds:</td><td><input type ="text" name="vārds"></td></ tr> <tr><td>Uzvārds:</td><td><input type = "text" name="uzv"></td></tr> <tr><td>Vecums:</td><td><input type ="text" name="gadi"></td></tr> <tr><td>E-mails :</td><td><input type="text" name="mails"></td></tr> <tr><td>Adrese:</td><td><input type="text" name="adr"></td></tr> <Tr><td>Telefons:</td><td><input type="text" name="tel"></td></tr> <tr><td></td><td><input type= "submit" name = "submit"value="apstiprināt "><input type="reset" name="reset" value="dzēst"></td></tr> </table></form> </body> tagad otrais fails *.php <? print ("<h3>Paldies par sniegto informāciju, $vards. Tu apstiprināji sekojošu informāciju: </h3>\n<table>\n"); print ("<tr><td>Vārds:</td><td><b> $vards</b></td></tr>\n"); print ("<tr><td>Uzvārds:</td><td><b>$uzv</b></td></tr>\n"); print ("<tr><td>Vecums:</td><td><b> $gadi</b></td></tr>\n"); print("<tr><td>E-mails:</td><td><a href=\"mailto:$mails\">$mails</a> </td></tr>\n"); Print ("<tr><td>Adrese:</td><td><b>$adr </b></td></tr>\n"); print ("<tr><td>Telefons:</td> <td><b> $tel</b></td></tr>\n</table>\n"); ?> cik saprotu kljuuda sleepjas jau tajaa php!! bet es tur pat daljeeji iedziljinoties liekas ka pirmajaa failaa kur ir ar html tur var to paartaisiit mybe uz php un tad straadaa bet nu nezinu!! pajautaashu jums! Link to comment Share on other sites More sharing options...
Dooling Posted September 9, 2006 Report Share Posted September 9, 2006 Tu esi uzstādījis PHP un Apache? Link to comment Share on other sites More sharing options...
snaikers Posted September 9, 2006 Author Report Share Posted September 9, 2006 nu bet logjiski !!! vispaar kas tas pa jautaajumu, ja teicu ka pirmstam es jau vienu piemeeru izlaboju un vinjhs straada!!! jaa, ja kas runa ir par mainiigajiem !! Link to comment Share on other sites More sharing options...
Dooling Posted September 9, 2006 Report Share Posted September 9, 2006 (edited) <? $vards=$_POST['vārds']; $uzv=$_POST['uzv']; $gadi=$_POST['gadi']; $mails=$_POST['mails']; $adr=$_POST['adr']; $tel=$_POST['tel']; print ("<h3>Paldies par sniegto informāciju, $vards. Tu apstiprināji sekojošu informāciju: </h3>\n<table>\n"); print ("<tr><td>Vārds:</td><td><b> $vards</b></td></tr>\n"); print ("<tr><td>Uzvārds:</td><td><b>$uzv</b></td></tr>\n"); print ("<tr><td>Vecums:</td><td><b> $gadi</b></td></tr>\n"); print("<tr><td>E-mails:</td><td><a href=\"mailto:$mails\">$mails</a> </td></tr>\n"); Print ("<tr><td>Adrese:</td><td><b>$adr </b></td></tr>\n"); print ("<tr><td>Telefons:</td> <td><b> $tel</b></td></tr>\n</table>\n"); ?> :) Edited September 9, 2006 by Dooling Link to comment Share on other sites More sharing options...
march Posted September 9, 2006 Report Share Posted September 9, 2006 (edited) 2. faila nosaukums ir form_parse.php? Un būtu jāraksta $_POST['mainīgais'] nevis $mainīgais saņemot no formas, ja vien nav register_globals on Edited September 9, 2006 by march Link to comment Share on other sites More sharing options...
snaikers Posted September 9, 2006 Author Report Share Posted September 9, 2006 (edited) nu bet tur jau ta lieta ka kjipa rekur ir kautkur kljuuda kuru nesanaak izlabot !!! vecajaa bija tas apts tikai viss iisaak un tur es izlaboju shaadi html lapaa <input="type" name="vards">; nododam apstraadi php $_post['vards']; EDIT: ideaali !!! liels paldies, uzreiz saprashan paraadijaa daudz vairaak, tagad izlaboshu arii veel dahzaas vietas kur vnk raxtiiju biku nepareizi :) Edited September 9, 2006 by snaikers Link to comment Share on other sites More sharing options...
snaikers Posted September 9, 2006 Author Report Share Posted September 9, 2006 (edited) un ja es html pirmajaa rindaa kur ir form tagaa es pamainu "post uz "get" kaa tad iisti darbosies mainiigie ? hmm Edited September 9, 2006 by snaikers Link to comment Share on other sites More sharing options...
bubu Posted September 9, 2006 Report Share Posted September 9, 2006 ...un tur es izlaboju shaadihtml lapaa <input="type" name="vards">; Tas skaitās, ka tu izlaboji?? Tak atver jebkuras html lapas sourci un pameklē šādu inputu... Un kā vienmēr RTFM: http://www.w3.org/TR/html4/interact/forms.html#h-17.4 Link to comment Share on other sites More sharing options...
Recommended Posts