chimniii



If you know jquery and you have hands on this it would be very simple for you to post ajax request to php without whole page refresh. You just need to include this code in your html or js file

$.ajax({
type:'post',
url:'data.php',
data:{emp_id:emp_id},
success:function(data)
{
console.log(data)
},
errror:function(data)
{
console.log(data)
}

})

php file

<?php
include('db_config.php');
header('Content-Type:application/json');
if(isset($_POST["emp_id"])
{
 $emp_id=$_POST["emp_id"];
$query='select * from employee where employee_id="$employee_id" ';
$rsquery=mysql_query($res,$con);
$rscount=mysql_num_rows($rsquery);

$data=array();
for($i=0;$i<$rscount;$i++)
{
$data[]=mysql_fetch_array($rsquery);
}
print json_encode($data);


}

?>

for more referece  you can visit
 https://www.formget.com/form-submit-without-page-refreshing-jquery-php/
https://stackoverflow.com/questions/2866063/submit-form-without-page-reloading
https://tecadmin.net/submit-form-without-page-refresh-php-jquery/
chimniii.com