【发布时间】:2012-04-17 21:28:28
【问题描述】:
假设这是我的表单域代码:
<form action="process.php" method="post">
<input type="text" size="25" name="username" />
<input type="text" size="25" name="password" />
</form>
这两个输入框允许用户输入信息。在process.php,你可以用同样的方法抓取变量:
$username = $_POST['username'];
$password = $_POST['password'];
现在我想通过传递参数直接打开页面“process.php”
我用这个链接
localhost/process.php?username=ahmed&password=123456
不工作,我知道使用 $_GET 是否可以正常工作
$username = $_GET['username'];
$password = $_GET['password'];
但我想使用 $_POST
我会用这种方式打开这个页面吗???
【问题讨论】: