简体   繁体   中英

$_Post undefined variable var_dump

Hey I'm creating my first php form and really struggling with what I'm doing wrong here;

this is the form:

               <form method="post" action="includes/contact-process.php">

                    <table>
                        <tr>
                            <th>
                                <label for="name">Name</label>
                            </th>
                            <td>
                                <input type="text" name="name" id="name">
                            </td>
                        </tr>
                        <tr>
                            <th>
                                <label for="email">Email</label>
                            </th>
                            <td>
                                <input type="text" name="email" id="email">
                            </td>
                        </tr>
                        <tr>
                            <th>
                                <label for="message">Message</label>
                            </th>
                            <td>
                                <textarea name="message" id="message"></textarea>
                            </td>
                        </tr>                    
                    </table>
                    <input type="submit" value="Send">

                </form>

and this is the contact-process.php

<?php

var_dump($_Post);

?>

and this is what it keeps returning:
Notice: Undefined variable: _Post in \\includes\\contact-process.php on line 3 NULL

It should be $_POST , not $_Post :

<?php
    var_dump($_POST); 
?>

$ _POST区分大小写,$ _ POST与$ _Post不同,因此请尝试

var_dump($_POST);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM