0

これは、フィードバックをリクエストする HTML フォームです。

電子メールを送信するために Web サーバーに配置する対応する PHP フォームは何ですか? 私はウェブサイトのデザインは初めてで、CSS + HTML しか学んでいません。

<table width="518" border="0">
          <tr>
            <td width="165"><form name="form1" method="post" action="">
              <label for="nameco">Name/Company</label>
            :
            </form></td>
            <td width="343"><input name="nameco" type="text" id="nameco" size="70"></td>
          </tr>
          <tr>
            <td><form name="form2" method="post" action="">
              <label for="area">Area you are located :</label>
            </form></td>
            <td><input name="area" type="text" id="area" size="70"></td>
          </tr>
          <tr>
            <td><form name="form3" method="post" action="">
              Products interested in :
            </form></td>
            <td><table width="198">
              <tr>
                <td width="190"><label>
                  <input type="radio" name="Product" value="awnings" id="Product_0">
                  Awnings</label></td>
                </tr>
              <tr>
                <td><label>
                  <input type="radio" name="Product" value="carport" id="Product_1">
                  Carport/Shadeport</label></td>
                </tr>
              <tr>
                <td><label>
                  <input type="radio" name="Product" value="patio" id="Product_2">
                  Patio</label></td>
                </tr>
              <tr>
                <td><label>
                  <input type="radio" name="Product" value="other" id="Product_5">
                  Other
                  <input type="text" name="other1" id="other1">
                  </label></td>
                </tr>
            </table></td>
          </tr>
          <tr>
            <td><form name="form4" method="post" action="">
              <label for="contactno">Contact Number :</label>
            </form></td>
            <td><input name="contactno" type="text" id="contactno" size="70"></td>
          </tr>
          <tr>
            <td><form name="form5" method="post" action="">
              <label for="email">Email Address :</label>
            </form></td>
            <td><input name="email" type="text" id="email" size="70"></td>
          </tr>
          <tr>
            <td><form name="form7" method="post" action="">
              <label for="Comments">Additional Comments :</label>
            </form></td>
            <td><input name="Comments" type="text" id="Comments" size="70"></td>
          </tr>
          <tr>
            <td><form name="form8" method="post" action="">
              <input type="submit" name="Submit" id="Submit" value="Submit">
            </form></td>
            <td><form name="form9" method="post" action="">
              <input type="submit" name="reset" id="reset" value="Reset Form">
            </form></td>
          </tr>
        </table>

ドリームウィーバーからです。そして、このPHPファイルを介して送信するようにフォームに知らせるにはどうすればよいですか?

4

1 に答える 1

1

アドバイスできるとしたら、あまり多くのフォームを使用せず、1 つだけ使用actionしてsend.php.

send.php次のようになります。

<?php
$to = "$_POST['email']";
$subject = "$_POST['subject']";
$message = "$_POST['message']";
$from = "your@email.com";
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?>
于 2013-07-21T22:33:02.950 に答える