toms42 Posted July 4, 2009 Report Share Posted July 4, 2009 Vai kads nevarētu pateikt kāpēc šis skript nesuta man uz e-pastu vestuli? contact.php <table width="400" border="0" align="center" cellpadding="3" cellspacing="1"> <tr> <td><strong>Contact Form </strong></td> </tr> </table> <table width="400" border="0" align="center" cellpadding="0" cellspacing="1"> <tr> <td><form name="form1" method="post" action="send_contact.php"> <table width="100%" border="0" cellspacing="1" cellpadding="3"> <tr> <td width="16%">Subject</td> <td width="2%">:</td> <td width="82%"><input name="subject" type="text" id="subject" size="50"></td> </tr> <tr> <td>Detail</td> <td>:</td> <td><textarea name="detail" cols="50" rows="4" id="detail"></textarea></td> </tr> <tr> <td>Name</td> <td>:</td> <td><input name="name" type="text" id="name" size="50"></td> </tr> <tr> <td>Email</td> <td>:</td> <td><input name="customer_mail" type="text" id="customer_mail" size="50"></td> </tr> <tr> <td> </td> <td> </td> <td><input type="submit" name="Submit" value="Submit"> <input type="reset" name="Submit2" value="Reset"></td> </tr> </table> </form> </td> </tr> </table> send_contact.php <table width="400" border="0" align="center" cellpadding="3" cellspacing="1"> <tr> <td><strong>Contact Form </strong></td> </tr> </table> <table width="400" border="0" align="center" cellpadding="0" cellspacing="1"> <tr> <td><form name="form1" method="post" action="send_contact.php"> <table width="100%" border="0" cellspacing="1" cellpadding="3"> <tr> <td width="16%">Subject</td> <td width="2%">:</td> <td width="82%"><input name="subject" type="text" id="subject" size="50"></td> </tr> <tr> <td>Detail</td> <td>:</td> <td><textarea name="detail" cols="50" rows="4" id="detail"></textarea></td> </tr> <tr> <td>Name</td> <td>:</td> <td><input name="name" type="text" id="name" size="50"></td> </tr> <tr> <td>Email</td> <td>:</td> <td><input name="customer_mail" type="text" id="customer_mail" size="50"></td> </tr> <tr> <td> </td> <td> </td> <td><input type="submit" name="Submit" value="Submit"> <input type="reset" name="Submit2" value="Reset"></td> </tr> </table> </form> </td> </tr> </table> P.S. Ja tas ko izsaka lietoju woano hostingu un gmail e-pastu Quote Link to comment Share on other sites More sharing options...
rATRIJS Posted July 4, 2009 Report Share Posted July 4, 2009 Nav sūtīšanas koda. Quote Link to comment Share on other sites More sharing options...
toms42 Posted July 4, 2009 Author Report Share Posted July 4, 2009 nu vai kāds nevarētu ieodt gatavu skriptu vai izlabot šo Quote Link to comment Share on other sites More sharing options...
bubu Posted July 4, 2009 Report Share Posted July 4, 2009 Tas tev jau nav nekāds skripts. Tu pliku kodu mums parādīji. Man pie tam izskatās divas reizes vienu un to pašu. Quote Link to comment Share on other sites More sharing options...
Kemito Posted July 5, 2009 Report Share Posted July 5, 2009 Nepamani, ka tie divi ir vai nu vienādi,v ai arī ļoti līdzīgi? Tās abas ir formas, bet nav paša koda kurš nosūtītu šos datus! Ja nemaldos, sāc ar to ka tev vaig SMTP(maill servisu) un tad vēl klāt pašu sūtīšanas kodu! Quote Link to comment Share on other sites More sharing options...
777 Posted July 5, 2009 Report Share Posted July 5, 2009 (edited) Kemito, kam tad vinjam SMTP ? vinam pietiks ar pliku mail(), vinam taksh nesutis 200 vestules diena ... toms42 if(isset($_POST['submit'])) { // email parbaude if(preg_match("/[a-zA-Z0-9_-.+]+@[a-zA-Z0-9-]+.[a-zA-Z]+/", $_POST['email']) > 0) { // parbaudam izvilktos datus $subject = htmlspecialchars($_POST['subject']); $message = $_POST['detail']; $name = htmlspecialchars($_POST['name']); $from = htmlspecialchars($_POST['email']); // mail $email = "tavs@epasts"; $headers = "From: " . $from . "\r\nReply-To: " . $from; $mail_sent = @mail( $email, $subject, $message, $headers ); echo $mail_sent ? "OK" : "Error"; } else { echo "Nepareizi uzradits emails"; } } apmeram taa Edited July 5, 2009 by 777 Quote Link to comment Share on other sites More sharing options...
marcis Posted July 6, 2009 Report Share Posted July 6, 2009 777 un kā tad mail() funkcija sūta e-pastu? 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.