私はウェブデザイナーであり、PHPについて多くのことを知っています。フォームがあり、値を3つの電子メールアドレスに送信する必要があります。PHPを使用して複数の電子メールアドレスにフォームデータを送信するにはどうすればよいですか?
は、ここに私のHTMLです:
<form id="player" method="post" action="process.php">
<label for="name">Your Name</label>
<input type="text" name="name" title="Enter your name" class="required">
<label for="phone">Daytime Phone</label>
<input type="tel" name="phone" class="required">
<label for="email">Email</label>
<input type="email" name="email" title="Enter your e-mail address" class="required email">
<input type="submit" name="submit" class="button" id="submit" value="I'd like to join Now" />
</form>
私は何とかのみONEメールアドレスにデータを送信する必要がありますPHPコードを発見したが、それが動作するかどう私も知りません。
<?php
// Get Data
$name = strip_tags($_POST['name']);
$email = strip_tags($_POST['email']);
$phone = strip_tags($_POST['phone']);
$url = strip_tags($_POST['url']);
$message = strip_tags($_POST['message']);
// Send Message
mail("[email protected]", "Contact Form Submission",
"Name: $name\nEmail: $email\nPhone: $phone\nWebsite: $url\nMessage: $message\n",
"From: Forms <[email protected]>");
?>
おかげ
Googleの「php」を複数のアドレスにメールで送信すると、実際に便利なヒットを得ることができます。最初はメール機能のPHPマニュアルです。 http:// php。 net/manual/en/function.mail.php 必要なのは、ページの最上部近くにあり、googleはあなたの友人です;) – ophychius