
03-04-2008, 09:49 PM
|
 |
عضو
|
|
تاريخ التسجيل: Dec 2007
مشاركة: 101
مستوى تقييم العضوية: 18
|
|
بالنسبه لفورم الكونتاكت
فقد عملته على الشكل التالي
انسخ هذا الكود الى الى صفحة الكونتاكت وهي html طبعا
كود:
<FORM action=sendeail.php method=post><!-- DO NOT change ANY of the php sections Rights saved By Maqany Free hosting Maqany.CoM --><?php
$ipi = getenv("REMOTE_ADDR");
$httprefi = getenv ("HTTP_REFERER");
$httpagenti = getenv ("HTTP_USER_AGENT");
?>
<P align=center><INPUT type=hidden value="<?php echo $ipi ?>" name=ip> <INPUT type=hidden value="<?php echo $httprefi ?>" name=httpref> <INPUT type=hidden value="<?php echo $httpagenti ?>" name=httpagent> Your Name <BR><INPUT size=35 name=visitor> <BR>Your Email<BR><INPUT size=35 name=visitormail> <BR><BR><BR>Attention<BR><SELECT size=1 name=attn> <OPTION value=" Sales n Billing " selected>Case1</OPTION> <OPTION value=" General Support ">Case2</OPTION> <OPTION value=" Technical Support ">Case3</OPTION> <OPTION value=" Webmaster ">Case4</OPTION></SELECT> <BR><BR>Mail Message <BR><TEXTAREA name=notes rows=4 cols=40></TEXTAREA> <BR><INPUT type=submit value="Send Mail"> <BR>Maqany Free Host<A href="http://maqany.com">Making Free Hosting like paid</A> </P></FORM>
وملف sendeail.php احفظه في نفس مكان صفحة الكونتاكت طبعا كل ماستقوم تعديله فيه هو ايميلك اللذي تريد استقبال الرسائل عليه
كود PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Sendemail Script</title>
</head>
<body>
<!-- Reminder: Add the link for the 'next page' (at the bottom) -->
<!-- Reminder: Change 'YourEmail' to Your real email -->
<?php
$ip = $_POST['ip'];
$httpref = $_POST['httpref'];
$httpagent = $_POST['httpagent'];
$visitor = $_POST['visitor'];
$visitormail = $_POST['visitormail'];
$notes = $_POST['notes'];
$attn = $_POST['attn'];
if (eregi('http:', $notes)) {
die ("Do NOT try that! ! ");
}
if(!$visitormail == "" && (!strstr($visitormail,"@") || !strstr($visitormail,".")))
{
echo "<h2>Use Back - Enter valid e-mail</h2>\n";
$badinput = "<h2>Feedback was NOT submitted</h2>\n";
echo $badinput;
die ("Go back! ! ");
}
if(empty($visitor) || empty($visitormail) || empty($notes )) {
echo "<h2>Use Back - fill in all fields</h2>\n";
die ("Use back! ! ");
}
$todayis = date("l, F j, Y, g:i a") ;
$attn = $attn ;
$subject = $attn;
$notes = stripcslashes($notes);
$message = " $todayis [EST] \n
Attention: $attn \n
Message: $notes \n
From: $visitor ($visitormail)\n
Additional Info : IP = $ip \n
Browser Info: $httpagent \n
Referral : $httpref \n
";
$from = "From: $visitormail\r\n";
mail("sales@mandriva4rb.com", $subject, $message, $from);
?>
<p align="center">
Date: <?php echo $todayis ?>
<br />
Thank You : <?php echo $visitor ?> ( <?php echo $visitormail ?> )
<br />
Attention: <?php echo $attn ?>
<br />
Message:<br />
<?php $notesout = str_replace("\r", "<br/>", $notes);
echo $notesout; ?>
<br />
<?php echo $ip ?>
<br /><br />
<a href="contact.php"> Next Page </a>
</p>
</body>
</html>
طبعا التعديل في السطر رقم 59
|