The form does not send data to the query string

I am here on my way, I am sure that this is some kind of ridiculous input error, or I forgot to write something.

In any case, I am trying to send data from a form inside a tweeter boot modal file to a file called "process.php", which uses the PHPMailer script. However, when I submit the form, no data is passed to the query string, url just changes to '/processed.php?'

If anyone could shed light on this, I would greatly appreciate it.

Here is 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 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 don't get anything in a querystring. Hope someone can help me.

Thanks in advance!

+3
source share
3 answers

, name input, , .

<input type="text" class="input-medium required" id="inputNavn">

<input type="text" class="input-medium required" id="inputNavn" name="inputNavn">
+8

.

<input type="text" class="input-medium required" id="inputNavn" name="inputNavn">
+2

, .

The identifier refers to the input as an object. This means that you can update or do something using input using javascript or other languages.

The name is the link used by the server language to access the data in this imput field.

If I remember well (this is a hint from my head, possibly incorrect): you can use javascript with the input name, but you cannot use php with the login ID

+1
source

All Articles