繁体   English   中英

php参数没有被调用

[英]php params not getting called

我有链接作为test.php?fullname=Fahim&emailid=test@test.com

在test.php我有下面

$fullname = $_POST['fullname'];
$emailid = $_POST['emailid'];

echo "$fullname===$emailid===";

我总是以======获得回应

我期待的是Fahim===test@test.com

知道为什么会这样吗?

在test.php中,将使用$ _GET接收数据,因为您正在使用URL发送数据

您的链接test.php?fullname=Fahim&emailid=test@test.com

$fullname = $_GET['fullname'];
$emailid = $_GET['emailid'];
echo "$fullname===$emailid===";

产量

Fahim===test@test.com

您必须使用$_GET['param_name']来检索通过url发送的值。

当您从网址传递参数时,这是一个获取请求。

在PHP中,我们使用$_GET从get请求中获取信息

$fullname = $_GET['fullname'];
$emailid = $_GET['emailid'];

echo "$fullname===$emailid===";

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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