واضح آرشیو وب فارسی:سایت ریسک: مشکل در اسکریپت ارسال ایمیل textile 04 دي 1386, 18:01سلام دوستان.اسکریپت زیر در "هلم" بخوبی کار می کنه اما در" cpanel " کار نمیکنه و فرم خالی ارسال میشه.لطفا اگر کسی سر دراورد راهنمایی کنه.ممنون میشم فایل mail.html <html> <head> <title> Mail Motor ::...</title> <script language="JavaScript"> <!-- function CheckForm(formID) { if (formID.name.value == "") { alert("Please enter your name!"); formID.name.focus(); return false; } if (formID.email.value == "") { alert("Please enter your email address!"); formID.email.focus(); return false; } if (formID.message.value == "") { alert("Please enter your message!"); formID.message.focus(); return false; } return true; } //--> </script> </head> <body> <center> <form method="post" action="motor.php" onsubmit="return CheckForm(this);"> <table border="0" cellpadding="2" cellspacing="0" style="font-family: verdana, arial; fonr-size: 10px;" height="496" width="446"> <tr><td> <p align="center"><font face="Tahoma" style="font-size: 8pt">NAME »</font></td><td> <p align="left"> <input type="text" name="name" value="" size="20" style="font-family: Tahoma; font-size: 8pt; color: #800000; border: 1px solid #800080"></td></tr> <tr><td> <p align="center"><font face="Tahoma" style="font-size: 8pt">FAMILY »</font></td><td> <p align="left"> <input type="text" name="family" value="" size="20" style="font-family: Tahoma; font-size: 8pt; color: #800000; border: 1px solid #800080"></td></tr> <tr><td> <p align="center"><font style="font-size: 8pt">COMPANY »</font></td><td> <p align="left"> <input type="text" name="company" value="" style="font-size: 8pt; font-family: Tahoma; color: #800000; border: 1px solid #800080" size="20"></td></tr> <tr><td> <p align="center"><font style="font-size: 8pt">PHONE »</font></td><td> <p align="left"> <input type="text" name="phone" value="" style="font-family: Tahoma; font-size: 8pt; color: #800000; border: 1px solid #800080" size="20"></td></tr> <tr><td> <p align="center"><font face="Tahoma" style="font-size: 8pt">SELECT »</font></td><td> <p align="left"> <select size="1" name="select" style="font-family: Tahoma; font-size: 8pt; color: #800000; border: 1px solid #800080"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> </select></td></tr> <tr><td> <p align="center"><font face="Tahoma" style="font-size: 8pt">CHECK »</font></td><td> <p align="left"><input type="checkbox" name="chek1" value="1"><input type="checkbox" name="chek2" value="2"><input type="checkbox" name="chek3" value="3"></td></tr> <tr><td> <p align="center"><font face="Tahoma" style="font-size: 8pt">RADIO »</font></td><td> <p align="left"> <input type="radio" value="gozine 1" checked name="radio" style="font-family: Tahoma; font-size: 8pt; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px"><input type="radio" name="radio" value="gozine 2"><input type="radio" name="radio" value="gozine 3"><input type="radio" name="radio" value="gozine 4"></td></tr> <tr><td> <p align="center"><font face="Tahoma" style="font-size: 8pt">EMAIL »</font></td><td> <p align="left"> <input type="text" name="email" value="" style="border: 1px solid #800080" size="20"></td></tr> <tr><td> <p align="center"><span style="font-size: 8pt">WEBSITE »</span></td><td> <p align="left"> <input type="text" name="website" value="" style="font-family: Tahoma; font-size: 8pt; color: #800000; border: 1px solid #800080" size="20"></td></tr> <tr><td valign="top"> <p align="center"> <font face="Tahoma" style="font-size: 8pt">MESSAGE »</font></td><td> <p align="center"> <textarea rows="7" cols="45" style="border:1px solid #800080; width: 343; height:157" name="message"></textarea></td></tr> <tr><td colspan="2" align="center" height="81"> <p align="right"> <input type="submit" value="ارسال" style="font-family: Tahoma; font-size: 8pt; color: #000080; border-style: dotted; border-width: 1px; padding: 0"> <input type="reset" value="فرم جدید" style="font-family: Tahoma; font-size: 8pt; color: #000080; border-style: dotted; border-width: 1px"></td></tr> </table> </form> </center> </body> </html> ------------------------------------------------------------------------------------------------------------------------- فایل motor.php: <? $email_address = "[email protected]"; $email_name = "NED : ( Networks Electronic Design )"; $next_page = "thanks.html"; $body = ""; $body .= "NAME: " . $name . " "; $body .= "FAMILY: " . $family . " "; $body .= "COMPANY: " . $company . " "; $body .= "PHONE: " . $phone . " "; $body .= "SELECT: " . $select . " "; $body .= "CHECK: " . $chek1 . "" . $chek2 . "" . $chek3 . " "; $body .= "RADIO: " . $radio . " "; $body .= "EMAIL: " . $email . " "; $body .= "WEBSITE: " . $website . " "; $body .= "MESSAGE: " . ereg_replace(" ", " ", $message) . " "; $headers = ""; $headers .= "From: " . $email_name . " <" . $email_address . "> "; $headers .= "X-Sender: <" . $email_address . "> "; $headers .= "X-Mailer: PHP "; $headers .= "X-Priority: 1 "; $headers .= "Return-Path: <" . $email_address . "> "; $headers .= "Content-Type: text/html; charset=UTF-8 "; @mail($email_address, "Contact Center", "<pre>" . $body . "</pre>", $headers); header("Location: " . $next_page); //This sends a confirmation to your visitor mail("$email","Thank You for visiting rahbord", "Hi $name, Thank you for your interest in rahbord! Cheers, $sitename $siteaddress","FROM:$adminaddress"); //Confirmation is sent back to the Flash form that the process is complete $sendresult = "Done!"; $send_answer = " MERSI "; $send_answer .= rawurlencode($sendresult); echo "$send_answer"; ?> ---------------------------------------------------------------------------------------- فایل thanks : <html> <head> <meta "Content-Language" content="en-us"> <meta "Content-Type" content="text/html; charset=utf-8"> <title>THANKS :::..</title> </head> <body> <table border="0" width="100%" id="table1" height="316"> <tr> <td> <p align="center"> </td> </tr> <tr> <td> <p align="center"><font face="Tahoma" size="2"><font color="#FF0000"> </font><font color="#333333">«««</font> <font color="#333333">اطلاعات با موفقيت ارسال شد</font> <font color="#333333">»»»</font></font><p align="center"> <font face="Tahoma" style="font-size: 8pt" color="#C0C0C0"> Networks Electronic Design</font></td> </tr> </table> </body> </html>
این صفحه را در گوگل محبوب کنید
[ارسال شده از: سایت ریسک]
[مشاهده در: www.ri3k.eu]
[تعداد بازديد از اين مطلب: 445]