<?php
function get()
{
if(isset($_POST['enquire'])
{
$flying_to = $_POST['flying_to'];
$str = "<b>".$flying_to."</b>";
echo $str;
}
}
?>
<script>
function table()
{
var a = '<?php get(); ?>';
document.getElementById("table").innerHTML = a;
}
</script>
I am calling a php function through a javascript but I am able to see just a constant predefined value which I used earlier for testing purposes. I want to actually create a table in HTML and in that I am appending it using javascript and fetching the data from database using php.
Thanks in advance.