I know that PHP is only server-side and it's impossible to call directly a PHP-FUNCTION from a link.
But I can't use JavaScript \ jQuery \ Ajax
This is my code in main.php
function refreshgt2(){
for($l=1; $l!=$max_cicle; ++$l ) {
$data->query("INSERT IGNORE INTO `table` (`name1`,`name1`,`anothername`,`dog`) VALUES ('ME','".$img[$l]."','".$l."','".$hello[$l]."')");
}
}
And the html,
<a href="#" >Do something</a>
I've just tried with this need a button that calls a php function but didn't work for me.
Someone can help me?
I need something that load the function only when I will press the link\button\image
xxx.php?callback=cb¶m=abc.zen.phpin this case.And it returns json/xml data, and you get it and invoke js function.As forzen.phpcallsmain.php, that's server-side matter,require_once('main.php'),run the function/method, and return result.