I am at my wits end here, I am positive that this is some ridiculous typing error, or I have forgotten to write something.
Anyway I am trying to send data from a form that is inside a twitter bootstrap modal to a file called ‘processed.php’ which uses the PHPMailer script.
However when I submit the form no data is passed to the query string the url just changes to ‘/processed.php?’
If anyone could shed some light on it I’d appreciate it very much.
Here’s the code:
HTML FIRST:
<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>
Now the 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;
?>
Anyway I am not getting anything in the querystring.
Hope someone can help me.
Thanks alot in advance!
I think that you need to add a
nameattribute to theinputso that the value is submitted e.g.should be