andis_g Posted December 8, 2003 Report Share Posted December 8, 2003 :rolleyes: Uzinstaleeju php, Omnisecure serveri(http), ir arii php editors. Bet nekas neiet, labi serveris straadaa, paraada vienkaarsus php bet neraada tos kur informaacija tiek nodota caur formaam uz naakoso lapu pat neiet taads kur formaaa ieraksti vaardu un peec submit nospieshanas tas paraada ko tu ievadiiji, respektiivi nekas neiet, kur i probleema. Link to comment Share on other sites More sharing options...
des Posted December 8, 2003 Report Share Posted December 8, 2003 ir: <form.....> .... <input type=text name=vaards> .... </form> vai Tu pie formas apstraadaashanas lieto $vaards? vai arii $_POST['vaards'] ? otro metodi ir lietot droshaak, jo to atbalsta defaultaa php konfiguraacija. ja arii ar $_POST['vaards'] nestraadaa, tad nezinu :) taapat arii, lai no index.php?blaha=1&muha=2, ir labaak lietot $_GET['blaha'] un $_GET['muha'] :) ceru, ka paliidzeeja :) Link to comment Share on other sites More sharing options...
andis_g Posted December 8, 2003 Author Report Share Posted December 8, 2003 Kautkas sanaak bet sitais vienalga nesanaak: <html> <form> ievadi vaardu:<br> <input type=text name=vards><br> <input type=submit value="ok"> </form> <br> es rakstiiju <?php echo($_POST['vards']); ?> </html> vai arii sitais <html> <form> ievadi vaardu:<br> <input type=text name=vards><br> <input type=submit value="ok"> </form> <br> es rakstiiju <?php echo($vards); ?> </html> raksta ka kluuda ir tur kur saakas ar >>> echo Link to comment Share on other sites More sharing options...
des Posted December 8, 2003 Report Share Posted December 8, 2003 hmm... kaada kljuuda tiek izmesta? jo it kaa vajadzeetu straadaat.... Link to comment Share on other sites More sharing options...
des Posted December 8, 2003 Report Share Posted December 8, 2003 aaa, sapratu, kur ir probleema: vajag raxtiit nevis vienkaarshi <form> bet <form method="post"> tad gan ar $_POST vajadzeetu straadaat :) es paarbaudiiju uz sava servera. Tavs saakotneejais variants tieshaam nestraadaa. Link to comment Share on other sites More sharing options...
K|NG Posted December 8, 2003 Report Share Posted December 8, 2003 cut cut cut ;) <html> <p> ievadi vaardu: </p> <form action="" method="post"> <input type="text" name="vards" /> <p> <input type="submit" value="ok" /> </p> </form> <?php if(isset($vards)){ echo $vards; } ?> </html> Link to comment Share on other sites More sharing options...
andis_g Posted December 8, 2003 Author Report Share Posted December 8, 2003 Beidzot straadaa pareizais variants ir <html> <p> ievadi vaardu: </p> <form method="post"> <input type="text" name="vards" /> <p> <input type="submit" value="ok" /> </p> </form> <?php echo($_POST['vards']); ?> </html> Thenks Link to comment Share on other sites More sharing options...
des Posted December 8, 2003 Report Share Posted December 8, 2003 npk :) Link to comment Share on other sites More sharing options...
andis_g Posted December 8, 2003 Author Report Share Posted December 8, 2003 AA veel jautaajums Man servera mapiite bija C:\server\http es visu metu tur tur nekas nestraadaaja php variantaa, tagad sametu mapiiti dziljaak saakas traadaat(php ar informaacijas nodoshanu uz jaunu lapu)??? AA un man ir viens sms skripts tur viss itkaa pareizi ievadiits, bet i probleema ar peedeejaam rindaam ,es kaa tikko saaku neko daudz nevaru izsecinaat.... <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>sūtām SMS</title> <link real="stylesheet" type="text/css" href="lemon.css"></head><body><?function print_err($reason,$num,$sms){?> <table width="300" class="err"> <tr><th colspan="2" class="err">...::kūda::...</th></tr><tr><td valign="top"> iemesls: </td><td class="bold_off"><?=$reason?></td></tr><Tr><td></td><td><a href="sms_send.php?phone=<?=$num?>&txt=<?=$sms?>">atgriezties</a></td></tr></table><?}function send_sms($addr,$op,$sms){$num=substr($addr,3,7);if (strlen($sms)>148){ $real_txt=substr($sms,0,143)."[...]"; $note="(nosūtāmāsi texts tiks saīsināts)"; } else{ $real_txt=$sms; } $reason="SMS nosūtīt neizdevās. Tev ir tiesības klusēt un neko nedarīt. Viss, ko tu turpmāk darīsi, var tikt izmantots pret tevi!..."; @Mail($addr,NULL,$real_txt,"From: sms@php.lv") or die(print_err ($reason,$num,$real_txt)); $f_handle=fopen("smslog.txt","a");fwrite($f_handle,"$num:$sms:".time()."\n");fclose($f_handle);?><table width="300"><tr><th colspan="2">...:: SMS nosūtīts! ::...</th><tr><tr><td vlign="top" colspan="2" class="bold_off">Uz <b><?=$op?></b>numuru<b><?=$num?></b> nosūtīta sekojoša sms<?=$note?>:</td></tr><tr><td vlign="top">teksts:</td><td>class="bold_off"><?=$real_txt?></td></tr><Tr><td></td><td><a> href="sms_send.php?phone=<?=$num?>&txt=<?$real_txt?>">atgriezties</a></td></tr></table><?} //3 dala function print_from($phone,$txt){?><form action="sms_send.php" method="post"><table><tr><th colspan="2">...:: sūtām sms ::...</th></tr> <tr><td vlign="top">numurs:</td><td><input type="text" name"num" size"8" maxlenght="7" value="<?=phone?>"></td></tr> <tr><td vlign="top">teksts:</td><td><textarea name="sms" cols="25" rows="5"><?=$txt?></textarea></td></tr> <Tr><td><td><input type="submit" name="submit" value="sūtīt"><input type="reset" name="reset" value="dzēst"</td></tr> </table></form> <? } //4 daļa if (isset($submit)){ $prefix=substr($num,0,2); if (empty($sms)){ print_err("Vai tad nu patiesi kādam tukšs jāsūta?\n",$num,$sms); } elseif (empty($num)){ Print_err("Kam sūtīt?\n",$num,$sms); } elseif (strlen($num)<7){ print_err("Manuprāt, tevis ierakstītajā numurā trūkst kāds cipars - <b>$num</b>\n",$num,$sms); } //ja lmt else{ if (($prefix == "64") || ($prefix == "90") || ($prefix == "91") || ($prefix == "92") || ($prefix == "93") || ($prefix == "94")){ $addr = "371".$num."@smsmail.lmt.lv"; send_sms($addr,"LMT",$sms); } //ja tele2 elseif (($prefix == "60") || ($prefix == "61") || ($prefix == "95") || ($prefix == "96") || ($prefix == "97") || ($prefix == "98")){ $addr = "371".$num."@sms.tele2.lv"; send_sms($addr,"Tele2",$sms); } else{ print_err("piedod, bet tu esi ievadiijis nepareizu numuru - <b>$num</b>\n",$num,$sms); } } } //taalaak else{ echo (print_form($phone,$txt)); } ?> </body> </html> ????///probleema ir else{ echo (print_form($phone,$txt)); }kas par vainu Link to comment Share on other sites More sharing options...
sviesc Posted December 8, 2003 Report Share Posted December 8, 2003 1. Grāmata PhP soli pa solim ir saraxtīta mazliet līki neko sliktu Aleksandram nevaru Teikt, bet viņš ir aizmirsis piebilst to ka viņš strādā ar php.ini failā ieslēgtiem register_globals, bet pēc defulta tie ir uz off. 2. Kapēc raxti tieši to kas tai grāmatā ir saraxtīts 3. lieto apache web serveri vieglāk nokonfigurēt palasi podā un nokofigurē savu apachi pēc sirds patikas... 4. tagad i parādijusies php rokasgrāmata un Te vari atrast diezgan interesantu infu par un ap php un drīz varēsi lasīt arī sviesc.valsts.lv Link to comment Share on other sites More sharing options...
Recommended Posts