here is my ajax code
//html
<input type="text" name="txtName" id="name_id" />
//test.php
$.ajax(
{
url:"controller.php",
data:$('#txtName').val(),
success:
function(result){
alert(result);
}
}
);
//controller.php
<?php
echo $_POST['txtName'];
?>
it gives me an error
Undefined index:txtName
Use parameter name
and in PHP
read it by
See