Display PHP results in HTML page -


i'm trying construct html page want have button , when click on it, php code executes on server "selecting" postgre database , displays results html page. php code in different file html , works fine. can help?

use jquery in opinion. it's extremely easy:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>  $('.getdatabutton').click(function(){     $.post( "php/phpdata.php",{data : data}, function( data ) {       $( ".result" ).html( data );     }); }); 

the function(data) part contains returned php values.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -

php - Accessing static methods using newly created $obj or using class Name -