20-08-2005, 13:06
|
|
|
|
חבר מתאריך: 04.10.04
הודעות: 442
|
|
אני בוטח שבחיפוש היית מוצא כמה דברים...
בכל זאת:
קוד PHP:
<?php $sendTo = "yourmail@yourmailserver"; $subject = "mail subject"; $headers = "From: " . $_POST["name"]; $headers .= "<" . $_POST["email"] . ">\r\n"; $headers .= "Reply-To: " . $_POST["email"] . "\r\n"; $headers .= "Return-Path: " . $_POST["email"]; $message = "message body -- \nname: " . $_POST["name"] . "\nphone: " . $_POST["phone"] . "\nemail: " . $_POST["email"]; mail($sendTo, $subject, $message, $headers); ?>
הקוד הזה יהיה קובץ php המקבל את הנתונים הנשלחים מהדף שלך...
בדף שלך יהיו השדות הבאים:
name
email
phone
נניח השקם של הקובץ ששולח את הדוא"ל הוא sender.php
אז ככה אתה צריך להגדיר את הטופס html:
<form action="sender.php" method="POST">
כמובן שאתה יכול להכניס שדות נוספים ולשלב אותם בהתאם בקוד המקבל
_____________________________________
linux is like an indian tent - no windows, no gates and one apache inside
|