You need PHP for that. Here's an example :
<html>
<form action='' method='POST'>
<input type='submit' name='submit' />
</form>
</html>
and then
if(isset($_POST['submit'])){
//execute mysql query
}
Use Sourcerer to include PHP scripts inside a custom HTML module.
EDIT :
How to use Sourcerer ?
- After the plugin is installed, a button (CODE) is added below the
WYSIWYG editor :
- Clicking on Code button opens a pop-up, enter your code between
{source} and {/source} tags like this:
- Hit the green Insert button to add this code to your Article or
Custom HTML module :)