1

誰かが私のフォーム設定の欠陥を見つけるのを手伝ってくれるかどうか疑問に思っていますか? メールは届きますが、メッセージ送信者が入力した情報はありません:

メール本文:

名前:

Eメール:

既存のお客様:

組織の種類:

メッセージ:

HTMLは次のとおりです。

<form action="email.php" method="POST" name="contact" enctype="text/plain">

            <label for="name">Name: </label><input type="text" name="name" id="name">
            <label for="email">Email: </label><input type="text" name="email" id="email"><br><br>

            <label for="existing">Have you written before?</label>
            <input type="radio" name="existing" value="Yes" id="existingyes">Yes
            <input type="radio" name="existing" value="No" id="existingno">No<br><br>

            <label for="orgtype">How do you classify yourself? </label><select id="orgtype">
                <option>Charity</option>
                <option>Business</option>
                <option>Individual</option>
                <option>Meat Popcicle</option>
                <option>Other</option>
            </select><br><br>

            <label for="essay">Thoughts? Questions? Comments</label><br>
            <textarea name="essay" rows="3" cols="70" id="essay">...</textarea><br><br>

            <input type="submit" value="Yell At Us!"><br>

そして、ここにPHPがあります:

    <?php
  $name    = stripslashes($_POST['name']);
  $email   = stripslashes($_POST['email']);
  $existing   = stripslashes($_POST['existing']);
  $orgtype = stripslashes($_POST['orgtype']);
  $essay = stripslashes($_POST['essay']);
  $form_message = "Name: $name \nEmail: $email \nExisting Customer: $existing \nOrg Type: $orgtype \nMessage: $essay";
  $success = mail("myemail@email.com", "Online Form Submission", $form_message, "From: $email" );
  if ($success){
  print "<meta http-equiv=\"refresh\" content=\"0;URL=index.html\">";

    } else {

echo "Sorry error please try again..."; 

}

?>

どんな助けでも大歓迎です!

4

1 に答える 1

0

タグから を削除しenctype="text/plain"ます。form

<form action="email.php" method="POST" name="contact">

ここでそれについて読むことができます method="post" enctype="text/plain" は互換性がありませんか?

于 2013-11-12T00:35:55.763 に答える