PHP使用带有get变量的链接发布变量
我想使用以下url示例发布变量:PHP使用带有get变量的链接发布变量,php,http-post,Php,Http Post,我想使用以下url示例发布变量: <form method="POST" action="index.php?p=1"> <input id="mail" type="text" size="50" placeholder="E-Mail" /> <input id="password" type="password" size="50" placeholder="Password" /> <button type="submit
<form method="POST" action="index.php?p=1">
<input id="mail" type="text" size="50" placeholder="E-Mail" />
<input id="password" type="password" size="50" placeholder="Password" />
<button type="submit">Login</button>
</form>
登录
通过链接“我的站点”中的p变量,确定应显示哪个默认站点
我的问题是,默认站点中的$\u POST数组中没有可用的数据
是否有可能$\u POST-data仅可用于调用的下一个脚本
或者我做错了什么?您需要命名输入。例如
name=“mail”
:
然后你可以访问
$\u GET['p']
和$\u POST['mail']
我不懂这个问题。请尝试使用名称
attribute@aldanux你说得对,谢谢;)基本HTML可能是硬的。@CharlotteDunois ok。
<form method="POST" action="index.php?p=1">
<input name="mail" id="mail" type="text" size="50" placeholder="E-Mail" />