比方說,這是我的表單域代碼:在URL參數傳遞到PHP頁面附加價值
<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」直接傳遞參數
我使用這個鏈接
本地主機/ process.php?用戶名=艾哈邁德&密碼= 123456
不worki NG,我知道,如果使用$ _GET將工作做好
$username = $_GET['username'];
$password = $_GET['password'];
,但我想用$ _ POST
什麼,我會用這種方式打開此頁面???
你使用ajax嗎? – mgraph 2012-04-17 21:30:37
你不能沒有GET。 – hjpotter92 2012-04-17 21:30:43
改爲使用'$ _REQUEST' – Baba 2012-04-17 22:42:33