0
私は選択フォームを開発し、結果を得るためにPHPスクリプトを呼び出すためにajaxを使用し、ajaxは正常に動作し、PHPに接続しましたが、は、フォームから結果を得ることができません
これは私の形式である:ここでは
<form method="post" action = "#">
<div class="functionitem" id="selector_phot">
<select name="photographer">
<option>All Photographers</option>
<option>John Baldwin</option>
<option>Wendy James</option>
<option>Ian Smith</option>
<option>Rebecca Fortesque-Smythe</option>
</select>
</div>
<div class="functionitem" id="selector_cat">
<select name="sets">
<option>All Sets</option>
<option>Ceremony</option>
<option>Lunch</option>
<option>Garden</option>
</select>
</div>
<div class="functionitem" id="viewresult"><span class="button"><span><input type="button" class="form_button" value=" View"></span></span>
</div>
<div class="functionitem" style="margin-right: 60px">
<span class="button"><span><input type="button" class="form_button" id="guestlogin" value=" Guest Login "></span></span>
</div>
<div class="functionitem">
<span class="button"><span><input type="button" class="form_button" id="register" value=" Register"></span></span>
</div>
は私のPHPスクリプトです:
if(isset($_POST['photographer'])&&isset($_POST['sets']))
{
echo "results";
}
それは結果を印刷する必要がありますが、私は間違って何をしなかったのですか、助けてください、ありがとう!ここ
は、Ajaxコードです:
サイドノート、あなたのオプションにvalue属性がないのはなぜですか? –
あなたのajaxコードはどこですか? –
すべてのことがうまくいくようです。あなたのajaxコードを投稿してください。 – confucius