Martins Zemitis Posted June 27, 2010 Report Share Posted June 27, 2010 Sveiki man ir luk gatavs scripts itkaa vis darbojas normali, bet nenosuta atiecigo informaciju uz e-pastu varbut kads zin kur ir vaina ? <?php function show_form() { ?> <form action="" method="post"> <p align="left">Dziesmas nosaukums *<br> <input type="text" name="name" size="70" /> </p> <p align="left">Jusu e-pasts *<br> <input type="text" name="email" size="70"></p> <p align="left">Club, Dance, Electro, Progressive, Trance, Hip-Hop, Cits.<br> <input type="text" name="title" size="70"></p> <p align="left">Link uz lejupladi *<br> <textarea rows="10" name="mess" cols="70">http://</textarea></p> <p align="left"><input type="submit" value="Nosutit" name="submit"></p> </form> <? } function complete_mail() { $_POST['title'] = substr(htmlspecialchars(trim($_POST['title'])), 0, 1000); $_POST['mess'] = substr(htmlspecialchars(trim($_POST['mess'])), 0, 1000000); $_POST['name'] = substr(htmlspecialchars(trim($_POST['name'])), 0, 30); $_POST['email'] = substr(htmlspecialchars(trim($_POST['email'])), 0, 50); if (empty($_POST['name'])) output_err(0); if(!preg_match("/[0-9a-z_]+@[0-9a-z_^\.]+\.[a-z]{2,3}/i", $_POST['email'])) output_err(1); if(empty($_POST['mess'])) output_err(2); $mess = ' Dziesmam nosaukums:'.$_POST['name'].' Sūtītāja e-pasts:'.$_POST['email'].' Link uz download:'.$_POST['mess']; $to = 'mansepasts@inbox.lv'; echo '<br><strong> <p class="box_green">Paldies! Jusu izveleta dziesma nosutita.</p></strong>'; } function output_err($num) { $err[0] = '<p class="box_blue">Kluda! Ievadiet dziesmas nosaukumu.</p>'; $err[1] = '<p class="box_blue">Kluda! Ievadiet e-pastu.</p>'; $err[2] = '<p class="box_blue">Kluda! Nav links uz lejupladi.</p>'; echo '<p>'.$err[$num].'</p>'; show_form(); exit(); } if (!empty($_POST['submit'])) complete_mail(); else show_form(); ?> Quote Link to comment Share on other sites More sharing options...
waplet Posted June 27, 2010 Report Share Posted June 27, 2010 mail serveris vispār ir? kādu erroru rāda? Quote Link to comment Share on other sites More sharing options...
Martins Zemitis Posted June 27, 2010 Author Report Share Posted June 27, 2010 mail serveris vispār ir? kādu erroru rāda? nevienu erroru nemet parada ka nosutits veiksmigi, bet informacija nenonak lidz manim Quote Link to comment Share on other sites More sharing options...
briedis Posted June 27, 2010 Report Share Posted June 27, 2010 (edited) Jā, viss tik tiešām darbojas normāli, tikai nekur netiek veikta pati sūtīšana, tikai tiek izvadīts teksts, ka tjipa nosūtīts... Edited June 27, 2010 by briedis Quote Link to comment Share on other sites More sharing options...
Martins Zemitis Posted June 27, 2010 Author Report Share Posted June 27, 2010 Jā, viss tik tiešām darbojas normāli, tikai nekur netiek veikta pati sūtīšana, tikai tiek izvadīts teksts, ka tjipa nosūtīts... tatad, ka lai dabuju to ka vinjs nosutas ? Quote Link to comment Share on other sites More sharing options...
briedis Posted June 27, 2010 Report Share Posted June 27, 2010 Paprovē izmantot mail() funkciju... Sīkāk - skatīt PHP rokasgrāmatu (http://lv.php.net) Quote Link to comment Share on other sites More sharing options...
Pentiums Posted June 28, 2010 Report Share Posted June 28, 2010 hahahahaha kaa reecu :D Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.