在PHP中处理HTML表单,没有名称字段 [英] Process HTML form in PHP with without name field
本文介绍了在PHP中处理HTML表单,没有名称字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
如果没有每个输入的名称,如何在PHP中处理HTML表单?
假设我想使用'id'选项
例如
< pre>< html>
< body>
< form action =welcome.phpmethod =post>
名称:< input type =textid =name>< br>
电子邮件:< input type =textid =email>< br>
< input type =submit>
< / form>
< / body>
< / html>
如果我做
<?php echo $ _POST [名称]; ?>
它不会打印任何东西!
谢谢提前。
我的尝试:
大家好,
如果没有每个输入的名称,我怎样才能在PHP中处理HTML表单?
假设我想使用'id'选项
例如
< pre>< html>
< body>
< form action =welcome.phpmethod =post>
名称:< input type =textid =name>< br>
电子邮件:< input type =textid =email>< br>
< input type =submit>
< / form>
< / body>
< / html>
如果我做
<?php echo $ _POST [名称]; ?>
它不会打印任何东西!
谢谢提前。
解决方案
_POST [name]; ?>
它不会打印任何东西!
谢谢提前。
我的尝试:
大家好,
如果没有每个输入的名称,我怎样才能在PHP中处理HTML表单?
假设我想使用'id'选项
例如
< pre>< html>
< body>
< form action =welcome.phpmethod =post>
名称:< input type =textid =name>< br>
电子邮件:< input type =textid =email>< br>
< input type =submit>
< / form>
< / body>
< / html>
如果我做<?php echo
_POST [ 名称]; ?>
它不会打印任何东西!
谢谢提前。
Hi all, How can I still process an HTML form in PHP without the name of each input? let's say i want to use the 'id' option for example <pre><html> <body> <form action="welcome.php" method="post"> Name: <input type="text" id="name"><br> E-mail: <input type="text" id="email"><br> <input type="submit"> </form> </body> </html>
If I do
<?php echo $_POST["name"]; ?>
it won't print anything!
Thanks in advance.
What I have tried:
Hi all, How can I still process an HTML form in PHP without the name of each input? let's say i want to use the 'id' option for example <pre><html> <body> <form action="welcome.php" method="post"> Name: <input type="text" id="name"><br> E-mail: <input type="text" id="email"><br> <input type="submit"> </form> </body> </html>
If I do
<?php echo $_POST["name"]; ?>
it won't print anything!
Thanks in advance.
解决方案
_POST["name"]; ?>
it won't print anything!
Thanks in advance.
What I have tried:
Hi all, How can I still process an HTML form in PHP without the name of each input? let's say i want to use the 'id' option for example <pre><html> <body> <form action="welcome.php" method="post"> Name: <input type="text" id="name"><br> E-mail: <input type="text" id="email"><br> <input type="submit"> </form> </body> </html>
If I do<?php echo
_POST["name"]; ?>
it won't print anything!
Thanks in advance.
这篇关于在PHP中处理HTML表单,没有名称字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文