私<select>オプションは文句を言わない私の電子メールフォームの送信
<form id="ContactForm" method="post" action="php/test2.php">
<div class="wrapper"> <strong>What cabin category are you interested in?</strong><br>
<select name="cat1" size="1" tabindex="31">
<option selected>Seclect Cabin Category</option>
<option value="Bunk Beds">Bunk Beds</option>
<option value="Minimum Inside">Minimum Inside </option>
<option value="Mid Inside">Mid Inside </option>
<option value="Highest Inside">Highest Inside </option>
<option value="Atrium View">Atrium View</option>
<option value="Boardwalk View">Boardwalk View</option>
<option value="Neighborhood View">Neighborhood View</option>
<option value="Promenade View">Promenade View</option>
<option value="Obstructed Oceanview">Obstructed Oceanview</option>
<option value="Minimum Oceanview ">Minimum Oceanview </option>
<option value="Mid Oceanview ">Mid Oceanview </option>
<option value="Highest Oceanview">Highest Oceanview </option>
<option value="Balcony - Neighborhood">Balcony - Neighborhood</option>
<option value="Balcony - Promenade">Balcony - Promenade</option>
<option value="Balcony - Oceanview">Balcony - Oceanview</option>
<option value="Balcony - Park View">Balcony - Park View</option>
<option value="Mini Suite - Balcony">Mini Suite - Balcony </option>
<option value="Suite - Balcony ">Suite - Balcony </option>
<option value="Family Suite - Balcony">Family Suite - Balcony</option>
<option value="Penthouse - Balcony">Penthouse - Balcony</option>
</select>
<strong>Second:</strong>
<select name="cat2" size="1" tabindex="32">
<option selected>Seclect Cabin Category</option>
<option value="Bunk Beds">Bunk Beds</option>
<option value="Minimum Inside">Minimum Inside </option>
<option value="Mid Inside">Mid Inside </option>
<option value="Highest Inside">Highest Inside </option>
<option value="Atrium View">Atrium View</option>
<option value="Boardwalk View">Boardwalk View</option>
<option value="Neighborhood View">Neighborhood View</option>
<option value="Promenade View">Promenade View</option>
<option value="Obstructed Oceanview">Obstructed Oceanview</option>
<option value="Minimum Oceanview ">Minimum Oceanview </option>
<option value="Mid Oceanview ">Mid Oceanview </option>
<option value="Highest Oceanview">Highest Oceanview </option>
<option value="Balcony - Neighborhood">Balcony - Neighborhood</option>
<option value="Balcony - Promenade">Balcony - Promenade</option>
<option value="Balcony - Oceanview">Balcony - Oceanview</option>
<option value="Balcony - Park View">Balcony - Park View</option>
<option value="Mini Suite - Balcony">Mini Suite - Balcony </option>
<option value="Suite - Balcony ">Suite - Balcony </option>
<option value="Family Suite - Balcony">Family Suite - Balcony</option>
<option value="Penthouse - Balcony">Penthouse - Balcony</option>
</select>
</form>
ありHTML のコピーであり、ここでの回答はPHPのスクリプトをフォームから引っ張られているような方法であるに表示
$message .= "<tr><td><strong>Secondary cruise date:</strong></td><td>" . strip_tags($POST['sdm2']) . "/" . strip_tags($_POST['sdd2']) . "/" . strip_tags($_POST['sdy2']) . "</td></tr>";
$message .= "<tr style='background: #eee;'><td><strong>Ship/Itenerary:</strong></td><td>Ship:" . strip_tags($POST['ship']) . " Itenerary:". strip_tags($_POST['iten']) . "</td></tr>";
PHPスクリプトの最後には、引っ張られているものの値をマッキングするデータライブラリがあります(意味がある場合は、それを見る方法)
//Data Library
$prefix = $_POST['p_prefix'];
$firstname = $_POST['p_firstname'];
$lastname = $_POST['p_lastname'];
$address = isset($_POST['p_address']) ? $_POST['p_address'] : '';
$city = $_POST['p_city'];
$state = $_POST['p_state'];
$zip = $_POST['p_zip'];
$phone = $_POST['p_number'];
$email = $_POST['p_email'];
$passengers = $_POST['ad1'];
$children = $_POST['cd1'];
$cabins = $_POST['cab1'];
$cruiseline1 = $_POST['line1'];
$nights1 = $_POST['n1'];
$destinations1 = $_POST['dest1'];
$cruiseline2 = $_POST['line2'];
$nights2 = $_POST['n2'];
$destinations2 = $_POST['dest2'];
$seconddate = $_POST['sdm2'];
$seconddate2 = $_POST['sdd2'];
$seconddate3 = $_POST['sdy2'];
$ship = $_POST['ship'];
$iten = $_POST['iten'];
$air = $_POST['air'];
$aircity = $_POST['aircity'];
$category1 = $_POST['cat1'];
$category2 = $_POST['cat2'];
$spec = $_POST['special'];
$occasion = $_POST['occasion'];
$weddingmonth = $_POST['wd1'];
$weddingday = $_POST['wd2'];
$weddingyear = $_POST['wd3'];
$submit = $_POST['f_submit'];
$antispam = $_POST['aspam'];
フォームの作成とHTML電子メールへの処理に使用されます。結果はこのようになります Error 入力テキストは表示されますが、<select>
要素の回答は表示されません。
アイデア?
申し訳ありません初めて使っています – miessau
このような質問は、SOがコードなしでjsfiddlesを投稿できない理由です!そして、なぜあなたはJSエリアの中にPHPを入れましたか? –
他にどこに置くことができたかわかりません – miessau