JavaScript
ユーザーは、次の/を使用して自分のコンピューターでページを実行しますAjax
。
xmlhttp.open("POST", "ProcessRequest.php", true);
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlhttp.send(encodeURIComponent("fname=Mr.&lname=tester"));
サーバー側スクリプト ProcessRequest.php が変数にアクセスできないようです。
たとえば
$_POST['fname']
、次のエラーが発生します。
Notice: 未定義のインデックス: fname
私は何を間違っていますか?私はWAMPを使用してこれを実行しています。