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
Post a Comment