Hi i have a very tiny problem. I am using ajax call to fetch values onblur of customer id. I am able to get one value in form but i want multiple values to fill form fields. my partial code is as follows:
req.onreadystatechange = processReqChange;
req.open("GET", url + '?mob=' + number, true);
req.send(null);
function processReqChange() {
if (req.readyState == 4) {
if (req.status == 200) {
document.getElementById('oper').value = req.responseText;
}
}
}
My php code for sending the data:
$f = fopen('file.csv', "r");
$result = false;
while ($row = fgetcsv($f)) {
if ($row[0] == $mob) {
$result = $row[1];
break;
}
}
fclose($f);
echo $result;
How should i send multiple values like $row[2], $row[3] to fill form fields like username, email etc. Please advice.