私はここで頭がおかしくなりました。これはばかげた入力ミスであるか、何かを書き忘れていることは確かです。
とにかく、Twitter ブートストラップ モーダル内にあるフォームから、PHPMailer スクリプトを使用する「processed.php」というファイルにデータを送信しようとしています。ただし、フォームを送信すると、クエリ文字列にデータが渡されず、URL が「/processed.php?」に変わります。
誰かがそれに光を当てることができれば、とても感謝しています。
コードは次のとおりです。
HTMLファースト:
<div class="modal-body">
<form id="send-msg" method="GET" action="processed.php">
<fieldset>
<div class="control-group">
<label class="control-label" for="inputNavn">Navn:</label>
<div class="controls">
<input type="text" class="input-medium required" id="inputNavn">
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputTlf">Telefon nummer:</label>
<div class="controls">
<input type="text" class="input-medium required" id="inputTlf">
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputMsg">Besked:</label>
<div class="controls">
<textarea class="input-large required" id="inputMsg" rows="3"></textarea>
</div>
</div>
<div class="control-group">
<div class="controls">
<button type="submit" class="btn btn-primary btn-large" id="inputSend" href="#" rel="popover" data-content="Vi vender tilbage hurtigst muligt." data-original-title="Send besked" data-loading-text="Sender besked…">Send besked</button>
</div>
</div>
</fieldset>
</form>
<div id="results" class="alert alert-info span2">
<p>Udfyld venligst alle felter.</p>
</div>
</div>
今PHP:
<?php
$navn= $_REQUEST['inputNavn'];
$tlf= $_REQUEST['inputTlf'];
$besked= $_REQUEST['inputMsg'];
require_once('PHPMailer/class.phpmailer.php');
...(The rest is just the PHPMailer script)
echo $navn;
?>
とにかく、クエリ文字列に何も入っていません。誰かが私を助けてくれることを願っています。
よろしくお願いします!