In this video, i will teach you how to get data from a database without refreshing the browser using AJAX and then display the data. When i am changing the select option value it automatically get value from database using AJAX.
<!--Load New Order from DataBase instant without refresh using php mysql ajax-->
<div id="auto">Auto refresh</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready( function(){
$('#auto').load('loadNewOrder.php');
refresh();
});
function refresh(){
setTimeout( function() {
$('#auto').load('loadNewOrder.php');
refresh();
}, 500);
}
</script>
loadNewOrder.php
====================
<?php
echo "Tutorial Stars";
?>
<!--Load New Order from DataBase instant without refresh using php mysql ajax-->
<!--Load New Order from DataBase instant without refresh using php mysql ajax-->
<div id="auto">Auto refresh</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready( function(){
$('#auto').load('loadNewOrder.php');
refresh();
});
function refresh(){
setTimeout( function() {
$('#auto').load('loadNewOrder.php');
refresh();
}, 500);
}
</script>
loadNewOrder.php
====================
<?php
echo "Tutorial Stars";
?>
<!--Load New Order from DataBase instant without refresh using php mysql ajax-->
EmoticonEmoticon