can anybody pls help me....
how can i call a PHP script or function by using button?
for example, i have this PHP script
<HTML>
<?
function func(){
$rv="PHP Script";
return $rv;
//button script here.
}
?>
</HTML>
what should i do next if I want the function 'func' to be called
by pressing button...by the way, the button script should reside inside the PHP script...
Originally posted by ray326 PHP runs on the server but buttons "run" in the browser. You have to submit the page (make a request) to get PHP code to run.
Which means that the function is going to have to be called on page load because when the page is resent you are either going to be on a new page or the page you are on will be refreshing depending on the action.
Bookmarks