Is it possible to call a PHP function from a html anchor's onlick event?
so that when I click on an image, I call a php function?
echo '<tr><td><a onclick="' . approved('$index') . ',src=\'approved.jpg\'">
Is it possible to call a PHP function from a html anchor's onlick event?
so that when I click on an image, I call a php function?
echo '<tr><td><a onclick="' . approved('$index') . ',src=\'approved.jpg\'">
Echo ("<a href=\"LINK\"><img src=\"IMG URL\" width=\"0\" height=\"0\" border=\"0\" onClick=\"<? php ?>\"></a>")
Micah,
your concept is right except for a minor adjustment....
try this...
echo "<tr><td><a href=\"yourpage.php?approved=".approved('$index')."&src=approved.jpg\">";
upon reading your thread again, not it is not possible without refreshing the page. PHP is server side, so it needs to be processed by the server.... You make it sound like you want it to do an action without reloading the page... in that case, you would want to use JavaScript... since that is client-side.