Sir I have following codes
<form name="form1" action="<?php $_PHP_SELF;?>" method="post">
<label> Code </label>
<input type="text" size="7" name="ppcode" id="ppcode" onblur="myCall()"
value="<?php echo $acc_code1;?>"/>
</form>
//function mycall()
function myCall() {
var data = $("#ppcode").val();
var request = $.ajax({
url: "party_search.php",
type: "Get",
data:{"code":data},
dataType: "html"
});
request.done(function(msg) {
var msg = msg.split("##");
$("#party").val(msg[0]);
});
request.fail(function(jqXHR, textStatus) {
alert("Request failed: " + textStatus);
});
}
// party_search.php
include_once("includes/connectsql.php");
echo ($_POST['ppcode']);
$d_f=($_POST['ppcode']);
$query ="SELECT desc1 from master where code= '".$d_f."'";
$result=sqlsrv_query($con, $query);
if ($result){
$row = sqlsrv_fetch_array($result);
$res=$row['desc1'];
echo $res;
}
It shows this error message
Notice: Undefined index: ppcode in D:\wamp\www\atsql17_php\party_search.php on line
what I am doing wrong?
Please help