I have made a method which will delete a file.
first i echo the url to this file.
like this
echo "<a href='$fulr'>$filename</a>";
now basicaly i want to call the function deletefile($file);
how can i do it like this
echo "<a onclick='$this->deletefile($filename)' href='$fulr'>$filename</a>";
is that even posible?
Or how can i implement something similiar inside the php code?
You seem to have the wrong idea about browser/server communication. You need to either do:
In the server, so that the link goes to a script on the server, or use JavaScript. I would recommend using jQuery’s post() function or a similar AJAX function:
Remember: security, security, security … then graceful degradation
And thanks waiwai933, David Dorward for allowing me to “see the wood for the trees” on a fundamental point quickly forgotten.