Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

$_POST is empty, form

$_POST is empty before form, I don’t know why.

        <form method = "POST">
        <div class = "formDiv">
            <label for="name">name</label>
            <input class="name" id="name">
        </div>
        <div class = "button1">
            <input type="submit" value="submit">
        </div>
    </form>

PHP:

var_dump($_POST);

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

your fields require name attribute

   <form method = "POST">
        <div class = "formDiv">
            <label for="name">name</label>
            <input name ="name" class="name" id="name">
        </div>
        <div class = "button1">
            <input type="submit" name="submit" value="submit">
        </div>
    </form>
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading