Sir,
I am using these codes.
<script type="text/javascript">
$("#moba").change(function() {
var formVal = $("#moba").val();
$.get( "ajax_find.php", { id: formVal } ) .done(function( data )
{
$('#my_name').val(data);
$('#mobb').val(data);
$('#email').val(data);
});
});
</script>
And ajax_find.php has these codes
<?php
require_once("connect.php");
if (isset($_GET['id']))
{
$sno =trim($_GET['id']);
$record_check ="SELECT * FROM contacts WHERE moba = '$sno' ";
$result=mysqli_query($con, $record_check);
$row = mysqli_fetch_array($result);
echo (!$row) ? "" : $row['name'];
echo (!$row) ? "" : $row['mobb'];
echo (!$row) ? "" : $row['email'];
}
?>
It shows data as
My_name=Eric00924587582abc@hotmail.com
(3 fields data in FIRST textbox only)
But I want to display data in 3 textbox which has id’s as
$('#my_name').val(data);
$('#mobb').val(data);
$('#email').val(data);
It must display data as
my_name=Eric
mob=00924587582
email= abc@hotmail.com
How to modify both files?