26
ฟังก์ชั่นจดหมาย PHP ไม่สามารถส่งอีเมล์ได้อย่างสมบูรณ์
<?php $name = $_POST['name']; $email = $_POST['email']; $message = $_POST['message']; $from = 'From: yoursite.com'; $to = 'contact@yoursite.com'; $subject = 'Customer Inquiry'; $body = "From: $name\n E-Mail: $email\n Message:\n $message"; if ($_POST['submit']) { if (mail ($to, $subject, $body, $from)) { echo '<p>Your message has been sent!</p>'; } else { echo '<p>Something …